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 |
What is dot net architecture?
what is managed data and managed code?
What is the intermediate language between asp and asp.net1.0?
What is an interface and what is an abstract class? Please, expand by examples of using both. Explain why?
What is implement a generic action in webapi?
What is the difference between odbc and ado?
Give an example for setter/ write-only methods
Explain what is a manifest in .net?
What is the difference between a debug and release build?
Can you explain what do you understand about web service?
What does cli do?
What is use of ContextUtil class?