Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/288.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在VisualStudio中将类设置为子文件夹或可折叠_C#_Class_Subdirectory - Fatal编程技术网

C# 如何在VisualStudio中将类设置为子文件夹或可折叠

C# 如何在VisualStudio中将类设置为子文件夹或可折叠,c#,class,subdirectory,C#,Class,Subdirectory,在VisualStudio2010中如何实现这一点 它就像一个类,但可折叠。有人有主意吗 谢谢 Visual Studio gallery中有两个扩展,说明它们提供了此功能,例如: 听起来NestIn就是你想要的,VSCommands列出了它有更多的功能(我从来没有使用过它,所以不适合评论任何一种方式)你可以在你的.csproj中使用标记 您必须手动编辑.csproj文件 下面是一个示例:此处fxtradingvoice.cs和汇款通知.cs作为依赖项添加到Invoice.cs。这将提供

在VisualStudio2010中如何实现这一点

它就像一个类,但可折叠。有人有主意吗

谢谢


Visual Studio gallery中有两个扩展,说明它们提供了此功能,例如:

听起来NestIn就是你想要的,VSCommands列出了它有更多的功能(我从来没有使用过它,所以不适合评论任何一种方式)

你可以在你的
.csproj中使用
标记

您必须手动编辑
.csproj
文件

下面是一个示例:此处
fxtradingvoice.cs
汇款通知.cs
作为依赖项添加到
Invoice.cs
。这将提供与解决方案资源管理器中的screeshot相同的视图

WpfApplication1.csproj:


发票
发票
输出:


这些是
.csproj
文件中定义的“依赖文件”。这与课程无关。嗨,雅各布-是的,我检查了我的csproj,是的,里面有dependentupon。我的问题是,你能以图形的方式做到这一点吗?或者你必须全部打字?谢谢!(悲伤的开发者是悲伤的)我求助于nestin:D谢谢北朝鲜大学
<Compile Include="Invoice.cs"/>
<Compile Include="FxTradingInvoice.cs">
  <DependentUpon>Invoice.cs</DependentUpon>
</Compile>
<Compile Include="RemittanceInvoice.cs">
  <DependentUpon>Invoice.cs</DependentUpon>
</Compile>