Right, you didn't say you wanted to 'change' the value, just 'access' it, so what I wrote above is a read only property.
public bool MyProperty
{
get
{
return true;
}
set
{
// do something with 'value' here.
Console.WriteLine(value);
}
}
/- Sam Judson : Wrox Technical Editor -/
|