Click here to Skip to main content
13,042,789 members (75,386 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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

is it possible?
Posted 19-Oct-12 4:06am
Amin ra769
Sergey Alexandrovich Kryukov 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.

1 solution

Rate this: bad
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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 20 Oct 2012
Copyright © CodeProject, 1999-2017
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