Still haven't made yourself quite clear. But I think this is what you want. Create a class library. Add 2 classes, giving them a name of "Class1.cs" and "Class2.cs". Close Visual Studio. Open the ".CSPROJ" file in notepad. Replace this line:
<Compile Include="Class2.cs" />
...with these three lines:
<Compile Include="Class2.cs">
<DependentUpon>Class1.cs</DependentUpon>
</Compile>
Save and close the file. When you open the solution, "Class2.cs" will be listed under "Class1.cs". Keep in mind that you can name "Class1.cs" and "Class2.cs" whatever you want, but I used those simple examples so that the above example would be clear. Is this what you wanted?
Also, somebody made a macro to automate the above process. I haven't tried it, but if you want to, then see
here.