I have three classes like this.
class A
{
public class innerB
{
//Do something
}
public class innerC
{
//trying to access objB here directly or indirectly over here.
//I dont have to create an object of innerB, but to access the object created by A
//i.e.
innerB objInnerB = objB;
//not like this
innerB objInnerB= new innerB();
}
private innerB objB{get;set;} **//Private**
public A()
{
objB= new innerB();
}
}
I want to access the object of class B in Class C that is created by class A. Is it possible somehow to make changes on object of Class A in Class C. Can i get Class A's object by creating event or anyhow.
Edit: My mistake in asking the question above. Object of B created in A is private not public
IS IT POSSIBLE TO DO THIS BY CREATING EVENT
If anyhow I become able to raise an event that can be handled by Class A, then my problem can be solved.