The property or indexer 'property' cannot be used in this context because it lacks the get accessor
An attempt to use a property failed because no get accessor method was defined in the property.
The following sample generates CS0154:
public class b { public int i { set { } // uncomment the get method to resolve this CS0154 /* get { return 0; } */ } } public class a { public static void Main() { b bb = new b(); int j = bb.i; // CS0154, no get method } }