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 the domain object?
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?
mention what is csdl, ssdl and msl sections in an edmx file?
How the ‘page lifecycle’ of ASP.Net MVC does works?
What is the .net framework?
What are actions in asp.net mvc?
i just want to write an exam regarding .net?plz give me information about taking a test?where to pay 4 d exam,exam centre?
Will c# 3.0, vb.net 9.0, atlas, or linq be included in the .net framework 3.0?
What are the main features of asp.net mvc 4 used by asp.net web api?
What is the .net framework 3.0 (formerly winfx)?
What is a razor file?
What are the new enhancements done in default project template of asp.net mvc 4?
how do you truncate a table using entity data model?
What is the difference between renderaction and renderpartial?
How we can call a javascript function on the change of a dropdown list in mvc?