C# Class Generator (beta)

Talked with Salman last week... He told me that he've created a C# Class Generatorbeta. I just tried it and it's pretty funny. :)

Well, that's really a common situation that we have to create a class, declare private member(s), constructor(s), expose public properties (get...set....get....set.... )...  repeatedly everyday. However, we have to type everything in creating a new class, no matter we're using VS.NET or Web Matrix.

Salman sick of this manual process and create this tool finally.

It work just fine, but this tool will insert (unwanted) characters such as “str“, “i“ “bool“ to the private members though, here is a sample:

public class  Quiz

      {

            // private members

            string _strName;

            string _strTitle;

            string _strCompany;

            string _strEmail;

            ...

 

            // empty constructor

            public Quiz ()

            {

            }

 

 

            // full constructor

            public Quiz (string name, string title, string company...)

            {

                  this._strName = name;

                  this._strTitle = title;

                  this._strCompany = company;

                  this._strEmail = email;
                  ...
            ...

 

Update: Salman add a new option to toggle the insertion of Prefix Type recently. :)

3 Comments

  • That's neat. I did something like that recently, but used Excel. You'd just type in the properties like Salman has, and various Excel cells would light up and have the code in them that you could then cut and paste into VS.NET.



    Perhaps someone could create an Add-In for VS.NET to accomplish something similar?

  • It's a good service for the programmer....and a good small additional function for our FYP....

  • Good suggestion Scott, I've ping Salman about our cooperation and creation of such Add-In ;)

Comments have been disabled for this content.