'Clear A Textbox 'Or 'Declare A Variable and Store Data From The Textbox
'Clear A Textbox 'Or 'Declare A Variable and Store Data From The Textbox
have to look at your paste papers for anything about arrays and text files. There some questions relating to use of arrays and text files .you got go through them please. Am talking about 1 looping array ! declaring arrays " working with two dimensional arrays and text files # $opulating array using..for..next loop or for each loop % using streamreader and streamwriter & controls e.g buttons'listboxes'textboxes etc ( how to use sub procedures and functions ) how to use arguments within function or sub procedures * textiles+reading and writing 1, -ou have to know how to declare things .ote/$aste paper are good ....check how to answer the questions please.
'clear a textbox TextBox1.Clear() 'or TextBox1.Text = "" 'declare a variable and store data from the textbox Dim strname As Strin = TextBox1.Text Dim intx As !nte er = Convert.To!nt"#(TextBox1.Text) 'add data to listbox $istBox1.!tems.Add("%&alim'") 'delete selected item in listbox $istBox1.!tems.(emoveAt($istBox1.Selected!ndex) 'clear listbox $istBox1.!tems.Clear() 'declare an arra) Dim names() As Strin = *"+a'l", "-en". 'or Dim st'dents(#) As Strin st'dents(/) = "+eter"
st'dents(1) = "+a'l" st'dents(#) = "rachael" 'declare a t&o dimensional arra) Dim ne&name(,) As Strin ne&name(/, /) = "+a'line" ne&name(/, 1) = "-imani" 'loo+ an arra) Dim arr() As !nte er Dim iloo+er As !nte er 0or iloo+er = / To arr.1et2++erBo'nd(/) messa ebox.Sho&(arr(iloo+er) 3ext 'or 0or 4ach iloo+er !n arr %essa eBox.Sho&(arr(iloo+er)) 3ext 'loo+ a t&o dimensional arra) Dim ne&n'mber(", ") As !nte er Dim x, ) As !nte er 0or x = / To ne&n'mber.1et2++erBo'nd(/) 0or ) = / To ne&n'mber.1et2++erBo'nd(/) %essa eBox.Sho&(ne&n'mber(x, ))) 3ext 3ext
'read from text file Dim ob8reader As 3e& !5.Stream(eader("c67-eni.txt") Dim strdata As Strin = ob8reader.(eadTo4nd 'close file to be 'sed b) other +ro rams ob8reader.Close()
'declare as f'nction +roced're 0'nction min's() As !nte er (et'rn 1// 4nd 0'nction ''se ar 'ments &ithin a f'nction 0'nction addition(B):al x As !nte er) As !nte er (et'rn x 4nd 0'nction 'create a s'b +roced're S'b add() 4nd S'bvv