Click here to Skip to main content
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 ra655
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 OriginalGriff 520
1 Maciej Los 290
2 Richard MacCutchan 265
3 BillWoodruff 265
4 Suraj Sahoo | Coding Passion 155
0 OriginalGriff 8,764
1 Sergey Alexandrovich Kryukov 7,437
2 DamithSL 5,639
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411028.1 | Last Updated 20 Oct 2012
Copyright © CodeProject, 1999-2014
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