Amit Tiwari
Tell me Guys.. Can Object will be Constant or Readonly....?
By Amit Tiwari in C# on Jun 27 2013
  • Urukundappa Gudise
    Oct, 2013 27

    ConstantsConstants are static by default They must have a value at compilation-time (you can have e.g. 3.14 * 2, but cannot call methods) Could be declared within functions Are copied into every assembly that uses them (every assembly gets a local copy of values) Can be used in attributes Readonly instance fieldsMust have set value, by the time constructor exits Are evaluated when instance is created

    • 1
  • Poornima
    Aug, 2013 6

    objects can only be readonly.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS