可能重複:
In Visual Studio (2008) is there a way to have a custom dependent file on another custom file?C# - 在VS2005項目分部類
我如何能在VS2005項目中添加一個部分類,以便它顯示爲隱藏文件的代碼主文件?
例如:我想將我的類屬性保存在一個名爲MyClass.cs
的文件中,我想將我的類屬性保存在名爲MyClass.attr.cs
的文件中。
當我打開VS2005工程,MyClass.attr.cs
-file會顯示爲隱藏文件MyClass.cs
代碼,在WinForm應用程序就像Form1.cs
和Form1.Designer.cs
。
你可以在項目文件中做到這一點 - 請參閱http://stackoverflow.com/questions/727898 – 2009-06-28 16:04:48