.NET property generating “must declare a body because it is not marked abstract or extern” compilation error

后端 未结 9 1387
离开以前
离开以前 2021-02-13 20:03

I have a .NET 3.5 (target framework) web application. I have some code that looks like this:

public string LogPath { get; private set; }
public string ErrorMsg          


        
9条回答
  •  执念已碎
    2021-02-13 20:50

    You are correct; that style is allowed.

    I'd look into the standard assemblies referenced. I'm not sure which you'd need to get that to compile, but I figure somewhat you're pointing to the .Net v2.0 version of csc.exe.

提交回复
热议问题