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 .net and why it is used?
Do I have any control over the garbage collection algorithm?
what is prototype design pattern in .net
Is .net 4.8 backwards compatible?
How .NET is able to support multiple languages?
Explain the use of activex control in .net?
What is nmake tool?
Differentiate between 'DataSet' and 'SQLDataReader' in ADO.NET?
What is CLR? How it will work?
Explain about managed heap?
How to use datagrid value in select statements where condition ,if cell is hyperlink bounded column?
Dynamic Fonts