Property Syntax

Skip to first unread message

David Seruyange

Jan 11, 2007, 1:47:50 PM1/11/07
to World's Simplest Code Generator
So Scott Hanselman pointed me to the WSCG after I showed him a tool I
maded called "proper" at: -

I was wondering what WSCG expects for property synax?

Thanks much!


Leon Bambrick

Jan 11, 2007, 6:12:31 PM1/11/07
to is very nice.

to create some properties in WSCG you could do this:

in the first box, enter the name and type or property on each line:

age, int
name, string

then select "C# properties" from the drop down list.

it will create:

private int m_age;
private string m_name;

public int age
get { return m_age; }
set { m_age = value; }

public string name
get { return m_name; }
set { m_name = value; }

...okay actually at the moment it will format this slightly wrong in
terms of line breaks and space -- but the resulting code should be
valid and will compile.

There's also a ' properties' pattern.

.: -- take the worry out of timesheets :.

Reply all
Reply to author
0 new messages