c# 3.5 Automatic properties….sweeeeeet….

So, in c# 3.5, this code:
public int Property1 { get; set; }

gets compiled by csc.exe into:

[CompilerGenerated] private int <Property1>k__BackingField;

public int Property1
{
    [CompilerGenerated]
    get
    {
        return this.<Property1>k__BackingField;
    }
    [CompilerGenerated]
    set
    {
        this.<Property1>k__BackingField = value;
    }
}

 Nice!

2 thoughts on “c# 3.5 Automatic properties….sweeeeeet….

Leave a reply to harperj1029 Cancel reply