static void Main(string[] args) { ClassAutoProperty propertiesProd = new ClassAutoProperty("Television", 950.00, 10); Console.WriteLine(propertiesProd.PropName); propertiesProd.PropName = "Television 4k"; Console.WriteLine(propertiesProd.PropName); Console.WriteLine(propertiesProd.PropPrice); Console.WriteLine(propertiesProd.PropQty); }
public ReadOnlyClassAutoProperty(ClassAutoProperty property) { this.property = property; propertyType = new ReadOnlyTypeReference(property.Type); if (property.EmptyAccessors != null) { getAccessor = new ReadOnlyClassAccessor(property.EmptyAccessors.GetAccessorVisibility); setAccessor = new ReadOnlyClassAccessor(property.EmptyAccessors.SetAccessorVisibility); } if (property.InitialValue != null) { initialValue = LinqExpressionBuilder.BuildExpression(property.InitialValue); } }