c# - What is the appropriate way to manage and name forms in a solution? -
i beginner visual studio 2015 , c# , looking general advice not not find anywhere else, please bear me.
let's create new windows forms application, in solution explorer can see form1.cs has been added tree, , child form1.designer.cs , form1.
now want add form right clicking windowsformapplication1 , add > new item...
the solution explorer looks this:
for first c# project recreating notepad should not overly difficult, allow me familiarize myself language , syntax etc.
i have added second form project go to line number form, shown edit menu in notepad.
suppose want give form1 , form2 more meaningful names correct way this?
from properties inspector named form1 frmmain , form2 frmgoto noticed in solution explorer parent names still form1.cs , form2.cs:
so right clicked each parent node , renamed them so:
my question right or wrong approach? feel going have naming conflicts maybe.
to test tried showing frmgoto form so:
form frmgoto = new frmgoto(); frmgoto.showdialog(); i think did right, frmgoto show correctly have doubts regarding way renamed forms both property inspector , solution explorer.
was there wrong did above, should have used separate naming conventions property inspector form name , solution explorer name etc? run problems naming forms did above?
i suppose looking clarity how best rename forms within solution?
what did not wrong, there easier solution build visual studio solution explorer. right click on item , select rename:
visual studio ask if want perform project-wide rename classname of form:
by answering yes, should in order.





Comments
Post a Comment