Readonly vs. const?
Answers were Sorted based on User's Feedback
Answer / pavan
both of them does the same work these value cannot be
changed
but with a samll difference
using const we can assign a value before compile time
but using readonly we can assign value to the varible ones
in runtime
| Is This Answer Correct ? | 14 Yes | 0 No |
Answer / j_baghla
Both are used for constant values but in readonly variable
we can assign the value thru expression but we can't assign
value to constant variable thru expression.
| Is This Answer Correct ? | 5 Yes | 1 No |
Readonly vs. const?
<li id="Accomodation" runat="server" visible="false"><a href="../searchaccommodation.aspx?">Accomm</a></li> i have this code.now on server side i want to compare this id(Accommodation) value and want id i.e.Accommodation.visible=true;
Explain what is the difference between response.redirect & server.transfer?
What are the differences between com architecture and.net architecture?
Do you know what is linq?
What is singlecall activation mode used for in .net?
How to implement CAS in .Net?
Can you edit data in repeater control? How?
Do you know what is garbage collector?
How is a managed code executed?
What are the two kinds of properties.
What are the main components in .net?