Click here to Skip to main content
11,489,965 members (88,945 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# partial
Hello World:
I want To have Partial Class on Tree View Format Such as Windows Form(it has Code, Designer, resc)or Component( it has Code and Designer)
It's important for me that they shows to my on Tree View.
for Example :
---- MyClass.cs
-------MyClass.FavoriteName1.cs
-------MyClass.FavoriteName2.cs
-------
.
.

is it possible?
Posted 19-Oct-12 5:06am
Amin ra688
Comments
Sergey Alexandrovich Kryukov at 19-Oct-12 12:58pm
   
Not clear at all. What tree view? Of Visual Studio? Of your application? If so, what this application does?
Most likely, the question makes no sense at all.
--SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Format for a partial class.

File - MyClass.1.cs
     public partial MyClass
     ...
 
File - MyClass.2.cs
     public partial MyClass
     ...

File names are irrelevant and exist merely so show that two files would be used.

The only requirement is that you have declarations for the class in two or more places (can just have one class but that really is ignoring the point.)

The compiler and all users treat the class as ONE class.


It is possible from your question that you think it might treat it as two classes. If so then the answer to your question is no it is not possible.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 595
1 Andy Lanng 233
2 OriginalGriff 213
3 Maciej Los 170
4 _duDE_ 141
0 Sergey Alexandrovich Kryukov 9,608
1 OriginalGriff 8,475
2 Sascha Lefèvre 3,419
3 Maciej Los 3,106
4 Richard Deeming 2,370


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 20 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100