VS 2005 Class Designer-- Modify Templates?

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
 
M

Marc Gravell

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top