Example Simple POCO
public class PizzaSize
{
private int _ID;
private string _SizeName;
public int ID
{
get
{ return this._ID;}
}
public string SizeName
{
get
{ return this._SizeName;}
set
{ this._SizeName = value;}
}
… // other methods
}
Private fields for
properties
Getter for id:
“id” is a read-
only property
Getter and setter
for sizeName:
“sizeName” is a
read-write property
Note: C# has property-specific syntax
38