Archive for October 29th, 2008

Readonly variables in CSharp? Really?!

A lone oryx antelope. I’m sure most of you are familiar with the keyword “const,” which allows you to declare a variable and give it a value and assures that no other code will change the value.

const int v = 23;

public void Foo()
{
    // This causes a compile error
    v = 22;
}

But what about the times when you need something that kind of works like a const but needs to be initialized by the constructor? Read the rest of this entry »

Other Related Items:

Breville BKE820XL Variable Temperature KettleBreville BKE820XL Variable Temperature KettleTake the guess work out of making tea with this innovative Variable Temperature Kettle by Breville. Different teas require different infusion temperat... Read More >
Quantum Mechanical View of Reality - 4 Tapes Set, 7+HrsQuantum Mechanical View of Reality - 4 Tapes Set, 7+HrsFor four consecutive years, from 1983 to 1986 Faustin Bray produced workshops for Richard Feynman at Esalen Institute in Big Sur, CA. This is the firs... Read More >
Bluray DVD 4X Ext Reader for Pc USB 2.0 Read-only DeviceBluray DVD 4X Ext Reader for Pc USB 2.0 Read-only DeviceThe Norazza BRxROM is a read-only device for all popular media formats, including Blu-ray Discs. Besides Blu-ray Discs, the drive can read DVD+/-R(W) ... Read More >
DotNetNuke Sponsor

 

Most Valuable Blogger
Sponsor