Difference between static, const, read-only and static read-only
Im not clear with difference between static variable, const variable read-only variable and static readonly variable. Is there is any logical difference between them.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mahesh ChandPosted Jul 9, 2006, 1:48 PM
Non Static - Each object has it's own memory space. This is like each guy has it's own cigar ;-)
Static class - The entire class is static, means has a single memory space allocated for it.
Read-only - Can not modify the value of the member. Can read it only.
Const - It's a variable you can not modify. They are used to give a better readable name to a constant value.
Static read-only - Static + read only ;)
Hope it helps.