简体   繁体   English

ASP.NET将.cs文件放在枚举中的位置

[英]ASP.NET Where to place .cs file with enums

I have a file with defined enums. 我有一个带有已定义枚举的文件。 Inside my project, I have a page in which I'd like to use these enums. 在我的项目中,我有一个页面要使用这些枚举。 Where exactly should I save enums file and how is it possible to use it? 我应该将枚举文件保存在什么地方以及如何使用它? I tried using statement, but it seems that project doesn't know where is the file located. 我尝试使用语句,但是似乎项目不知道文件在哪里。

Example of Enums.cs Enums.cs的示例

namespace Enums
{
    // 
    [Flags]
    public enum TTDETAILS : long
    {
....

Place this class file in the App_Code folder at your site root. 将此类文件放在站点根目录的App_Code文件夹中。 If not present, add this folder your self. 如果不存在,请将该文件夹添加到您自己的文件夹中。 This is a special folder in ASP.NET system, which contains stand-alone classes, enums, structures etc. 这是ASP.NET系统中的一个特殊文件夹,其中包含独立的类,枚举,结构等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM