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 alias ? Is it used in .Net ?
What is the single responsibility principle?
Can you explain what do you understand about web service?
What is the difference between vb.net and vc#.net?
How to get the hostname or IP address of the server?
Using activex control in .net?
Where does the gac exist ?
How to store and retrieve images in SQL server database through VB.NET?
What are an object and a class?
create a keypair?
Explain can 2 different applications use the same dll in gac at the same time?
What is different between User Control and Web Control and Custom Control?