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
what is entity framework advantage?
What is meant by bootstrap in mvc5?
How route table has been created in asp.net mvc?
Explain the advantages of asp.net mvc over asp.net?
The order of the filters that get executed, if the multiple filters are implemented?
What are the difference between asynchronous controller implementation between asp.net mvc 3 & asp.net mvc 4?
What are action filters?
What is main objective of asp.net mvc 4 or what is new in mvc4 ?
Is .net core replacing .net framework?
What is viewdata?
Explain Bundle.Config in ASP.Net MVC4?
What is the importance of NonActionAttribute?
Explain Keep method in Tempdata in ASP.Net MVC?
How does .net framework works?
Which filter executes first in an asp.net mvc application?