auto-implemented-propert

How do I use .NET 3.0 in VS2005?

I am trying to use Auto-implemented properties in VS2005. I have .NET 3.0 framework loaded on my machine, but Visual Studio is still compiling with .NET 2.0. How do I tell it to use .NET 3.0? ...

Cannot modify the return value error c#

I'm using auto-implemented properties. I guess the fastest way to fix following is to declare my own backing variable? public Point Origin { get; set; } Origin.X = 10; // fails with CS1612 Error Message Cannot modify the return value of 'expression' because it is not a variable An attempt was made to modify a value type that was the...

Use of properties vs backing-field inside owner class

I love auto-implemented properties in C# but lately there's been this elephant standing in my cubicle and I don't know what to do with him. If I use auto-implemented properties (hereafter "aip") then I no longer have a private backing field to use internally. This is fine because the aip has no side-effects. But what if later on I need ...