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 Sergey Alexandrovich Kryukov 609
1 OriginalGriff 587
2 Maciej Los 325
3 Mathew Soji 195
4 BillWoodruff 190
0 OriginalGriff 7,356
1 Sergey Alexandrovich Kryukov 6,712
2 DamithSL 5,461
3 Manas Bhardwaj 4,916
4 Maciej Los 4,475


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.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