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
If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?
Explain Bundle.Config in ASP.Net MVC4?
What is the difference between renderaction and renderpartial?
Explain test driven development (tdd) ?
Name a few different return types of a controller action method?
What is the purpose of a web form?
How does servicing work for the .net framework 3.0?
Give an example for authorization filters in an asp.net mvc application?
Explain the 'page lifecycle' of an ASP.NET MVC?
How does servicing work for the .net framework 3.0? If I install the .net framework 3.0, can I get service updates for the .net framework 2.0?
Why we need a separate mobile project template, while we can render our web application in mobile ?
What is ViewData and TempData in ASP.Net MVC?
What is mapping in entity framework? : Entity framework
will there be any issues adding a table without primary keys to a data model?
Is .net core faster than .net framework?