在我的web服务不能使用公共类 [英] Can't use public class in my web service

查看:114
本文介绍了在我的web服务不能使用公共类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么我不能使用下面的公共类:

Why i can't use the following public class :

namespace OrganizerUI.App_code
{
    public class Employee
    {

        private string text;

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

    }
}


在我的 Web服务

推荐答案

常(总是),被添加到Visual Studio APP_ code目录code文件默认情况下不设置即使编译他们是净code。它们被设置到内容,这意味着它们被包括在仅输出。如果用鼠标右键单击该文件并选择属性就可以看到/将其更改为编译,而不是内容。

Often (always?), code files that are added to the Visual Studio App_Code directory are not set by default to compile even if they are .Net code. They are set to "Content" which means they are included in the output only. If you right-click the file and choose "properties" you can see/change it to "compile" instead of "content".

这篇关于在我的web服务不能使用公共类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆