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 the concept of inheritance in .net?
What is serialization in .NET? What are the ways to control serialization?
Explain me what is a design pattern and what is it for?
How to use datagrid value in select statements where condition ,if cell is hyperlink bounded column?
What are an object and a class?
What does jit compilation do in .net?
hai, about trading domain and need simple project on trading system. please help me...
What is difference between .net core and .net standard?
Is .net an object oriented language? What are their components?
Is .net a language?
What does msil do?
Explain the Difference between value and reference type.