.net - How to prevent duplicate code generation when placing winforms event handlers in other partial files -


in winforms application have myform.cs starts quite large. solve have created new file(myform.leftpanel.cs) using partial class of myform class subset of gui functionality.

however once in while, not always, when go designer event handlers have moved myform.leftpanel.cs gets regenerated in myform.cs empty functions. causes compiler error until manually remove them in myform.cs.

how can prevent these functions being regenerated?

i saw question placing these kind of files under main.cs in project, solution tell visual-studio find existing functions?

using method in winform partial classes placed myform.leftpanel.cs below myform.cs.

so far seem have solved problem.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -