c# - Why would this code be placed in a *.Designer.cs file? -


in project i'm maintaining, original developer put code @ top of main form's designer.cs file:

private void memberlistbox_load() {     datatable dtmembers = null;     sqlserver sqldal = null;      sqldal = new sqlserver(properties.settings.default.bidataconnection);     sqldal.commandtimeout = 120;     dataset dsmember = sqldal.runsqldataset("select poisontoe platypusdata..members abs(activeflg)=1 order poisontoe", "members");     dtmembers = dsmember.tables[0];      memberlistbox.datasource = dtmembers;     memberlistbox.displaymember = "poisontoe";      foreach (datarow unitdprow in dtmembers.rows)     {         string x = unitdprow[0].tostring();         memberlistbox.setitemchecked(memberlistbox.findstring(x), true);     } } 

wouldn't mainform.cs more usual location such code? purpose of having in mainform.designer.cs? should move out mainform.cs?


Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -