In the solution explorer you can see nested files:
Let's see how to do the same with the two files
The trick is in the project file (csproj). You need to look for the
Class1.Custom.cs file in it and indicate which item is its parent.
<Compile Include="Class1.cs" /> <Compile Include="Class1.Custom.cs"> <DependentUpon>Class1.cs</DependentUpon> </Compile>
And here's the result: