Mega Code Archive

 
Categories / C# Book / 01 Language Basics
 

0094 Class field

Class can have its own variables. They are called fields. class Rectangle { int Width; int Height; } Here the width and height are fields of Rectangle type. Fields can have the following modifiers: static public internal private protected unsafe readonly volatile