Solved

partial class c#

Posted on 2011-03-23
3
536 Views
Last Modified: 2013-12-17
Hello,

As you see in attached picture, Visual C# 2008 by default create two partial classes for each Form (cs and Designer.cs). I added more partial classes for DB_Inserts.cs and DB_selects.cs but they are not displayed a chiled of the .cs Class but at the same level in Solution Explorer tree. How can I make additional partial classses shown as childs of the main class?
partial-classes.png
0
Comment
Question by:smetechit
3 Comments
 
LVL 8

Accepted Solution

by:
crysallus earned 125 total points
ID: 35204803
I haven't tried it (at least not yet, as I just found it), but you may want to look at VSCommands, which appears to add that functionality. Try it here:

http://vscommands.com

It looks like the 2008 version can be downloaded here.
0
 
LVL 13

Assisted Solution

by:gamarrojgq
gamarrojgq earned 125 total points
ID: 35211353
Hi,

VS does that only for form designers, but if you want to "cheat"  VS, you can name the second file .designer.vb, it is not pretty but it works

So your first class would be

SomeClass.vb (Public Class SomeClass)

Your second class would be

SomeClass.designer.vb (Partial Class SomeClass)

This will put the second class inside the Fistone like the designer for a forma does, but will only work once, so you only can have a parent and 1 child.

Hope that helps
0
 

Author Closing Comment

by:smetechit
ID: 35419113
There is no solution but I got two suggessions
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now