gpt4 book ai didi

c# - 无法在我的网络服务中使用公共(public)类(class)

转载 作者:太空宇宙 更新时间:2023-11-03 20:18:22 25 4
gpt4 key购买 nike

为什么我不能使用以下公共(public)类:

namespace OrganizerUI.App_code
{
public class Employee
{

private string text;

public string Text
{
get { return text; }
set { text = value; }
}

}
}

在我的网络服务中:

enter image description here

最佳答案

通常(总是?),即使是 .Net 代码,添加到 Visual Studio App_Code 目录的代码文件也不会默认设置为编译。它们被设置为“内容”,这意味着它们仅包含在输出中。如果您右键单击该文件并选择“属性”,您可以看到/将其更改为“编译”而不是“内容”。

关于c# - 无法在我的网络服务中使用公共(public)类(class),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15225978/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com