Book a Demo

Author Topic: C# VS 2008 Automatic Properties Not Generating  (Read 3112 times)

eAndy

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
C# VS 2008 Automatic Properties Not Generating
« on: September 24, 2008, 09:26:48 pm »
I'm using C# and VS.NET 2008

They've introduced automatic properties in VS.NET 2008 so I can do

public class Person {
        public string FirstName { get; set; }
    }

and don't need to specify the details of the property.

I can reverse it just fine. But if I try to re-generate the code (round trip) it blows out the code

public string FirstName{
                  get{
                        return <unknown>;
                  }
                  set{
                        <unknown> = value;
                  }
            }


Any help? I'm on build 830, is this fixed in a subsequent version?

Thanks
Andy

see this for more details on automatic properties:http://weblogs.asp.net/scottgu/archive/2007/03/08/new-c-orcas-language-features-automatic-properties-object-initializers-and-collection-initializers.aspx

Hans

  • EA User
  • **
  • Posts: 78
  • Karma: +0/-0
    • View Profile
Re: C# VS 2008 Automatic Properties Not Generating
« Reply #1 on: September 28, 2008, 11:45:06 pm »
I second that!

Regards
Hans