A little advice for a variety of C # .NET Code Generator

Now many, many code generators, and some as well, we have got used to with a code generator.

We often find that the code generator to generate good code, after manual modification, after the change to change it beyond recognition, and
this time, we would like to re-generate the code, however, due to consider the issue defective, leads us dilemma,

Regenerate bar code, a change that part will be overwritten, which functions modify themselves in the end, it clearly now.
Not regenerate it, and added a new field, it has changed some fields, but also to modify what type of field, the situation cake mess
up.

In fact, Microsoft's VS editor code is part of the code is automatically generated, part of the code is to rely on artificial written, the code
is in two files are stored.
For example:
FrmItemsAdmin.cs artificial write their own files,
FrmItemsAdmin. Designer .cs is generated automatically generates a file,
write to the same class in two documents, using the partial class keyword.

In fact, benefits, where to write files in, where the code generator generates a file on a very clear,
regenerate the code, it is easy to cover up these documents do not have to worry about writing the program will be overwritten.

A lot of problems, as the difficulties encountered, will think of a solution, a lot of the problems encountered, the experience
on the rich, and slowly became a master, expert.

Reproduced in: https: //my.oschina.net/iwenr/blog/227862

Guess you like

Origin blog.csdn.net/weixin_33742618/article/details/91674962