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

后端 未结 4 1866
猫巷女王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:41

    You can only run .NET 3.0/3.5 features on a server that has just .NET 2.0 if you're using a web application or a precompiled site, rather than a Visual Studio "web site," since the latter is compiled on the server, where the former are compiled by Visual Studio.

提交回复
热议问题