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
Explain Model, view and Controllers in Asp.Net MVC?
What is the use of razor view engine?
What is the use of the default route {resource}.axd/{*pathinfo} ?
What are scaffold templates in mvc?
What is the difference between adding routes, to a webforms application and to an mvc application?
If I have multiple filters implemented, what is the order in which these filters get executed?
How we can invoke child actions in ASP.Net MVC?
what is more complex to implement property, methods or event? how can I define criteria to compare the difficulty of implementation between them? for example the number of methods wanted to implements property is 2 methods. how many methods I need it to implements events?
Explain covariance and contra-variance in .net framework 4.0. Give an example for each.
How do you assign a value to a complex number 7 how has exception hand changed in .net framework 4.0?
What is namespace of asp.net mvc?
what is eager loading?
What you mean by routing in mvc?
Name a few different return types of a controller action method?
Explain the difference between viewbag and viewdata in mvc?