• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 220
  • Last Modified:

Tool for generating class properties in C#

Hi,

Is there any equivalent of VB6 ClassBuilder in C#?
I need to generate a class with a few properties, their getter and setter methods.

Is there any in-built or free third party tool that does this?
0
rajesh_khater
Asked:
rajesh_khater
  • 2
2 Solutions
 
jasonclarkeCommented:
The 'Encapsulate Field' refactoring ability of the IDE will do most of what you need?

Create a simple private field in your class - then right click - select Refactor->Encapsulate Field.. - this will generate the property with getter/setter methods for you.
0
 
rajesh_khaterAuthor Commented:
Ok. Can the IDE also generate a constructor that accepts parameters for each and every member variable of the class?
0
 
jasonclarkeCommented:
> Can the IDE also generate a constructor that accepts parameters for each and every

no, I don't think so.  I am not sure this is something that you would often do by default...
0
 
Bob LearnedCommented:
You can use the Class Diagram tool.  The right-most button in the Solution Explorer is the 'View Class Diagram' button.

Here is the complete MSDN reference for Class Diagrams:

Working with Class Diagrams
http://msdn2.microsoft.com/en-us/library/33864ckt(VS.80).aspx

Bob
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now