Difference Between ReadOnly and Constant Variable in
compile time and Run Time.
Answer Posted / saiish bhat
readonly is compile time constant.
constant is runtime constant.
constatnt field is used to initialize at the declaration of
the field.
readonly field is used at the declaration or constructor of
the field.
| Is This Answer Correct ? | 0 Yes | 5 No |
Post New Answer View All Answers
What is Web API Routing?
Why do we need Sessions?
What is the best Macanism to clear the Cache in asp.net
What is the procedure to create the environment for asp.net? : asp.net mvc
If there are multiple update panels on the page say upd1 and upd2. There is a button placed in upd1. How can you stop upd2 to update when button placed in upd1 is clicked?
Is asp.net and .net the same?
What permissions do asp.net applications posses by default?
Where is the session stored?
How ASP and ASP.NET page works? Explain about asp.net page life cycle?
About CLR, reflection and assemblies?
What do you mean by serialize?
What is a swagger in web api?
How do you remove duplicates without using remove duplicate stage?
How many web.config files can I have in an application?
What is the basic purpose of the required field validator? How can you use a required field validator to check that the user changes the initial value of a text box? a listbox?