vb.net - Writing to Text Box keeps failing - Visual Basic 2010 -


apologies if easy mistake, quite new vb not sure going wrong. code produces results written textboxes @ end of process. code have @ moment:

public class form1     public sub buttoninput_click(byval sender system.object, byval e     system.eventargs) handles buttoninput.click         try             'information irrelevant question here..              mainmethod.main()              textboxbf.appendtext(bestglobalfitness.tostring("f4"))             textbox0.text = bestglobalposition(0)             textbox1.appendtext(bestglobalposition(1).tostring("f4"))             textbox2.appendtext(bestglobalposition(2).tostring("f4"))             textbox3.appendtext(bestglobalposition(3).tostring("f4"))             textbox4.appendtext(bestglobalposition(4).tostring("f4"))             textbox5.appendtext(bestglobalposition(5).tostring("f4"))             textbox6.appendtext(bestglobalposition(6).tostring("f4"))          catch ex indexoutofrangeexception             console.writeline("indexoutofrangeexception caught")         end try     end sub end class 

as can see, have tried both textbox.text , textbox.appendtext methods neither appear working. odd first line textboxbf.appendtext(bestglobalfitness.tostring("f4")) work..

here how bestglobalposition , bestglobalfitness entered in module:

module mainmethod     public bestglobalfitness double     public bestglobalposition([dim] - 1) double public sub main()     try         dim bestglobalposition([dim] - 1) double         bestglobalfitness = double.maxvalue          'rest of method here..          console.write("final best fitness = ")         console.writeline(bestglobalfitness.tostring("f4"))         integer = 0 bestglobalposition.length - 1             console.write("x" & & " = ")             console.writeline(bestglobalposition(i).tostring("f4") & " ") 

i can't see going wrong - appreciated!


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -