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:

  1. static
  2. public
  3. internal
  4. private
  5. protected
  6. unsafe
  7. readonly
  8. volatile
w__w__w._j___av___a2__s_.c___om__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.