Why are my auto-implemented properties working in ASP.NET 2.0?

后端 未结 4 1826
猫巷女王i
猫巷女王i 2021-01-21 06:58

I\'m using the auto-implemented properties syntax in the C# source files of my ASP.NET Web Application:

public int IdUser { get; set; }
...
this.IdUser = 1;
         


        
4条回答
  •  执念已碎
    2021-01-21 07:55

    Automatically implemented properties works in .NET 2.0, but you won't be able to compile code in Visual Studio 2005. There is a list of 3.0 features and their compatibility with 2.0

    http://csharpindepth.com/Articles/Chapter1/Versions.aspx

提交回复
热议问题