is there any easy way to auto generated code like this?

Posted by Kevin Yang on Stack Overflow See other posts from Stack Overflow or by Kevin Yang
Published on 2010-05-06T18:29:00Z Indexed on 2010/05/06 18:38 UTC
Read the original article Hit count: 678

Filed under:
|
|

i have a file which will be used across many app projects. the only difference of these files is the webserice referrence name. code like this:

    public void Test(){
Kevin.ServiceReference1.Service1Client client = new Kevin.ServiceReference1.Service1Client();
// do something....
}

like code above, the 'Kevin.ServiceReference1' will be replace by specified app project namespace. so, according to DRY(dont repeat yourself), i shouldn't just copy the file to many projects and rename the specified part manually. is there any way i can easily replace some parts of my template file to something related to the project?

© Stack Overflow or respective owner

Related posts about generated-code

Related posts about c#