Expand the List of Class Members in VS 2008 - c#

Is there any add-in for VS2008 Pro that provides me the ability to expand and see the list of members of each class - methods, properties,etc... - by expanding its tree node in Solution Explorer?

not possible from solution explorer, but is available via the Class View. go to the View menu and click on Class View to open it up.

Object Browser?
http://msdn.microsoft.com/en-us/library/exy1facf%28VS.80%29.aspx

In Solution Explorer you can click either on the project or individual file and select 'View Class Diagram'. It creates a diagram for all your classes. To see members of the class click on the down arrow next to the class name.

Related

Auto-Generating namespace for the class added in a folder in Visual Studio

I have take App_Code folder to my solution and added two more folders saying Business and Data. Now when I add a class to these folders the class added should be under the same namespace as name of the folder.
I,e If I add a class under Business that class should come under Business namespace.
similarly, If I add a class under Data that class should come under Data namespace.
I am bit new to this. Please help me in getting this done.
I think what might have gone on here is that you were in the Folder View of the Solution Explorer when you made your classes.
If you click the icon to the right of the home icon in the Solution Explorer Toolbar (see the image below), then you should be able to switch back to the Solution View. Now when you add a class the correct namespace will be generated automatically in the template. A lot of other convenient features are not available when making new classes in the Folder View, too, not exactly sure why!
"Switch between solutions and available views"
I know this is an old question, but I had the same problem and couldn't find any solutions in all my googling, so I felt I had to answer.

C# Find Places an Abstract Class is used

I had an abstract class Foo. I want to get a list of classes that derive from it. All my searches are returning how to do it via code, and really I'm just wondering if there's some built in feature of VS that will do it for me... seems simple enough just to get a list for non-programming purposes. Thanks
In VS2012 Solution Explorer expand the file icon, right click the abstract class and click Derived Types.
Alternatively open the class in Class View, right click and Show Derived Classes.
Go to the abstract class, right click on the class name and select option "Find All References".
Right click on the name of your class and choose Find all references.

C#: Visual 2008 code to UML diagram

I have code a Visual 2008 project. It have finished.
Now, my customer want document includes UML diagrams.
So, Can i switch automatically these code to UML something like class diagram or sequence diagram?
You can create class diagram out of existing code quite easily. Here is a good link to MSDN:
http://msdn.microsoft.com/en-us/library/vstudio/ff657806.aspx
Right-click on the project node in the solution explorer and add a new item. Choose Class Diagram. You can now drag class files onto the designer. You can arrange them, and show property->type associations.

Overriding Designer attribute in derived class

I have a class that inherits the built in System.Windows.Forms.Panel class. According to the metadata of the Panel class, it has an attribute named Designer. I am assuming this is what is causing my derived class to open in the form designer by default, rather than the code view. Is there a way I can override this attribute so that the file opens in code view?
I've found the answer. Thanks goes to Visual Studio: Make view code default using attribute.
[System.ComponentModel.DesignerCategory("")]
You could simply right-click and select "View Code" in VS, either in the Solution Explorer or in the designer view.

Visual Studio -- Expanded Intellisense View (Like a mapped treeview)

When you are typing with Intellisense and it shows you the parameters within a class, you can select a parameter and keep going until you arrive at the base level. When you are debugging, Visual Studio lets you stop on objects and inspect all of the parameters or fields within them.
Is there a way to build a treeview or diagram of all of the class parameters? I have a large class that included ton of sub objects and properties and I would like to build a view of all of its properties.
If you are just talking about being able to visualize your classes (through Visual Studio, not actually building a hierarchy through code) you can do it like this: In Visual Studio, click View - Class View. This will give you a tree view of your classes.
If you click View - Object Browser you will see a tree view of classes in other assemblies too, not just your classes.
EDIT
I think you are looking for something like the Solution Navigator in the Productivity Power Tools Visual Studio extension. Click Tools - Extension Manager - Online Gallery. Search for Productivity Power Tools and install it. You will then see an option under the View menu for the Solution Navigator.
If you want control over the way variable values are displayed during Visual Studio debugging sessions, you can apply the DebuggerDisplay attribute to the class of interest. You can alternatively overload ToString() on the class of interest to print the info you desire, assuming that this behavior would not conflict with any other requirements you may have.

Categories

Resources