E
Eric Borden
I have created the following classes (psuedo code example):
BaseClass
protected method BaseClass.Foo(object Test) {
Test = new object();
}
MyClass : BaseClass
private object myProperty;
MyClass() {
Foo(myProperty)
}
AnotherClass
private MyClass myClass;
AnotherClass() {
myclass = new MyClass();
{
The issue I'm having is if you try to access myclass.myProperty
while in the constructor of AnotherClass,
myclass.myProperty is null.
However, if you remove BaseClass and define Foo in MyClass,
myclass.myProperty is not null while scope is in the constructor of
AnotherClass.
Can someone help me understand this,
Eric
BaseClass
protected method BaseClass.Foo(object Test) {
Test = new object();
}
MyClass : BaseClass
private object myProperty;
MyClass() {
Foo(myProperty)
}
AnotherClass
private MyClass myClass;
AnotherClass() {
myclass = new MyClass();
{
The issue I'm having is if you try to access myclass.myProperty
while in the constructor of AnotherClass,
myclass.myProperty is null.
However, if you remove BaseClass and define Foo in MyClass,
myclass.myProperty is not null while scope is in the constructor of
AnotherClass.
Can someone help me understand this,
Eric