Monday, June 25, 2012

Difference between static variable and constant in c#?

Static Variables:
1.These are Initialized on constructors. 
2.These are Can be assigned for reference types.
3.These Variables set at run time.
1.Constants Variable set at compile time itself.
2.Constants must be initialized at declaration time.
3.Constants Assigned for value types only.
4.Constants only primitive data types.

No comments:

Post a Comment



Custom Search
Protected by Copyscape Plagiarism Software