For example:
public class A {
//propiedades y metodos
}
public class B {
//propiedades y metodos
}
// y luego:
public class classContainer {
public A class1 {get; set;}
public B class2 {get; set;}
}
How would I access the properties of my classes A and B from the Container class?
A style comment: C# class and property names are usually written in uppercase. It doesn't seem too appropriate to use the name "class1" for a property either...it's misleading.
If your "container" class were this:
and the class
A
had a name propertySomeAProperty
, then you could access that property with: