What is the difference between readonly and const

Answer Posted / vishnu

a read only
field can be initialized either in initialization or in
constructor

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How Do You Convert A Value-type To A Reference-type?

525


Can int be null in c#?

502


What is difference between dictionary and hashtable?

525


What is msil in c#?

555


Explain About a class access specifiers and method access specifiers.

546






Define assert() method? How does it work?

629


Can we inherit private class in c#?

498


What does protected internal access modifier mean?

551


what is the equivalent to regsvr32 and regsvr32 /u a file in .net development?

555


What is tochararray in c#?

452


Perfect Example Of While And Do-While Loop In C#.Net ?

572


Is a dll an assembly?

481


Suppose two interfaces have same method, so how will you implement these methods in derive class?

489


Can a class have multiple constructors c#?

500


What is Named parameter in C#?

554