VS 2005 Class Designer-- Modify Templates?

  • Thread starter Thread starter David Veeneman
  • Start date Start date
D

David Veeneman

I am using the VS 2005 Class Designer to create a business model for an
application. It is a great tool, but I don't think it does a very good job
creating skeleton code for properties. Here is an example of what it
generates:

public string Foo
{
get
{
throw new System.NotImplementedException();
}
set
{
}
}

I would like to modify the code that it generates, so that it looks like
this:

private string p_Foo = null;

public string Foo
{
get { return p_Foo; }
set { p_Foo = value; }
}

Does the Class Designer use templates for the code that it generates? Where
does it store them? Is there any documentation on how to modify them? Thanks
in advance for your help!

David Veeneman
Foresight Systems
 
Not an answer... but I thought I'd nip into the 2008 designer, hoping
beyond hope that it would default to the new syntax:

public string Foo {
get; set;
}

But nope! Out pops the exact code you posted... frustrating...

Marc
 
Back
Top