The use of accessor-modifiers is governed by the following restrictions:


Class A 
{ 
private string text = “init value”; 
public String Text 
{ 
       protected get{ return text;} 
       set{ text = value;} 
}
}

Reversed UML model:





Example of Tags required when an accessor-modifier is permitted only if the property or indexer has both a get and set accessor, and then is permitted only on one of those accessors:

Property text has both a get and set accessor.