what is the main differnce between const,readonly and static
Answer Posted / raja
1. we can initialize constant variable only at the
declaration where as readonly varaiable can be initialized
at either declaration or in constructor.
2. we can't use static modifier for the const variable
where as readonly variable can be declared as static
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Can I do things in il that I can't do in c#?
Is int an object in c#?
What does == mean in c sharp?
what are some characteristics of an array?
Does c# support properties of array types?
List the difference between the virtual method and the abstract method?
What is difference between class and interface in c#?
What is an Interface in C#?
What is the diff between the System.Array.CopyTo() and System.Array.Clone()?
What is response redirect in c#?
What does return do in for loop?
Compare and contrast between the System.Array.CopyTo() and Clone()?
Can we have static indexer in c#?
Are private members inherited in c#?
hi, is compulsory .net knowledge need for biztalk server training. if need, how far?.tell me some info abt real time instructors in hyd or other?