Check out example codes for "c# error CS0272". It will help you in understanding the concepts better.

Code Example 1

/* 
	Sedan.cs(10,7): error CS0272: The property or indexer 
    'Vehicle.LicensePlate' cannot be used in this context 
    because the set accessor is inaccessible 
    																*/
// Creating a superclass, neither private nor public works for setting
// PS it's too insecure
class Vehicle
  {
    public string LicensePlate
    { get; private set; }
  }								//creates error

class Vehicle
  {
    public string LicensePlate
    { get; protected set; }
  }								//fixes error

Learn ReactJs, React Native from akashmittal.com