Answer Posted / mr vinod kumar
The readonly keyword is different from the const keyword. A const field can only be initialized at the declaration of the field. A readonly field can be initialized either at the declaration or in a constructor. Therefore, readonly fields can have different values depending on the constructor used. Also, while a const field is a compile-time constant, the readonly field can be used for runtime constants as in the following example:
public static readonly uint l1 = (uint) DateTime.Now.Ticks;
What does a character do ?
On most systems, produces a rather annoying beep.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Will the name change be reflected in any of the existing .net framework 2.0 apis, assemblies, or namespaces?
What is the difference between model and entity?
I have 2+ years of fake experience,actually i could not answer for project questions..?how can i answer please suggest me..?
What are Non Action methods in ASP.Net MVC?
What is viewbag?
What is objectcontext? : Entity framework
What are the benefits of .net framework?
Are there any parts of the .net framework 3.0 that only work on windows vista?
what is msl?
What is renderbody?
Why to use html.partial in mvc?
What are ajax helpers in asp.net mvc?
What is .net architecture and framework?
Is mvc 4 supporting windows azure sdk (software development kit) ?
What are the versions of .net framework?