access property value of one class from another internal class in C#
- by starz26
how do i acces the property value from an internal class , see below?
namespace N1
{
public class ClassA
{
string var1 = null;
private ClassB b;
public ClassA()
{
var1 = "one";
b = new ClassB();
}
//property
public string Var1
{
get{ return var1; }
}
}
namespace N1
{
internal class ClassB
{
private void method()
{
// I need to access the value of Var1( property) from here, how to do this?
}
}
}