Property or indexer 'property' cannot be assigned to -- it is read only
An attempt was made to assign a value to a property, but the property does not have a set accessor. Resolve the error by adding a set accessor.
The following sample generates CS0200:
public class MainClass { // private int _mi; int I { get { return 1; } // uncomment the following set accessor // also uncomment the declaration for _mi // set { // _mi = value; // } } public static void Main () { MainClass II = new MainClass(); II.I = 9; // CS0200 } }