I have object Item, and it has Data Object in it. In order to access Data's properties I use the following code:
Item.Data.PropertyName
Is any way in C# to access Data's properties in the following way:
Item.PropertyName
without copy properties to "Item" object?
Example of Item class:
class Item{
public DataObject Data;
public AnotherDataObject Data1;
public AnotherDataObject Data2;
}
class DataObject{
public int Property1;
public int Property2;
.....
}
class DataObject1{.....}
......
other DataObjects classess similar to DataObject Implementation