Solved

partial class c#

Posted on 2011-03-23
3
545 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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