Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Search Your Question

Monday, May 5, 2008

What’s the difference between const and readonly?

You can initialize readonly variables to some runtime values. Let’s say your program uses current date and time as one of the values that won’t change. This way you declarepublic readonly string

DateT = new DateTime().ToString().

No comments:

Archives