C# Need Help Changing a Label.Text - My Function/method won't change my Form Label Text -


i wanted make function organize code better giving me headache, problem want use public function change label.text whenever call them form it's not working. how can working , please basic. thank you.

here's code:

namespace nosleephd {     public partial class nosleephd : form     {         public nosleephd()         {             initializecomponent();         }          public void selectfolder(string drivelabel, string writepath)         {             folderbrowserdialog tree = new folderbrowserdialog();             tree.rootfolder = environment.specialfolder.mycomputer;             tree.shownewfolderbutton = false;             tree.description = "please select drive or folder on external hard drive";             tree.showdialog();             if (tree.selectedpath.length != 0)             {                 drivelabel = tree.selectedpath.tostring();                 properties.settings.default.writepath01 = drivelabel.tostring();                 properties.settings.default.save();             }         }          private void button1_click(object sender, eventargs e)         {             selectfolder(label11.text, properties.settings.default.writepath01);         } 

but label11.text not show text. can kind please me out. thank you.

of course wouldn't: you're passing string label11.text function. pass label11 object , set text in selectfolder function.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -