Visual Basic
For counter = 0to myWidgetCollection.Count - 1 MessageBox.Show(myWidgetCollection.Item(counter).Name)
Number = Number - 1
If finalVelocity > cnstSpeedOfLight then
MessageBox.Show("You cannot exceed lightspeed!")
Function Method
PublicSub Remove(ByVal index asInteger)
System.Windows.Forms.MessageBox.Show("Index not valid!")
List.RemoveAt(index)
Throw Exceptions
PublicSub Accelerate(ByVal finalVelocity asInteger)
If finalVelocity > cnstSpeedOfLight then
Throw New SpeedOfLightException("You cannot exceed light speed!")
Catch Exceptions
' The following two property settings can also me done
' in the Properties window, but are shown here for completeness.
OleDbCommand2.CommandType = CommandType.StoredProcedure
' Set parameter values. In this case, all parameter values
OleDbCommand2.Parameters("au_id").Value = TextBox1.Text
OleDbCommand2.Parameters("au_lname").Value = TextBox2.Text
OleDbCommand2.Parameters("au_fname").Value = TextBox3.Text
OleDbCommand2.Parameters("phone").Value = TextBox4.Text
OleDbCommand2.Parameters("address").Value = TextBox5.Text
OleDbCommand2.Parameters("city").Value = TextBox6.Text
OleDbCommand2.Parameters("st").Value = TextBox7.Text
OleDbCommand2.Parameters("zip").Value = TextBox8.Text
OleDbCommand2.Parameters("contract").Value = CheckBox1.Checked
cmdresults = OleDbcommand2.ExecuteNonQuery()
MessageBox.Show("Failed to execute command, err = " & ex.Message)
Previous page: FTP : How to connect to FTP server and get a Directory Listing
Next page: Files & Directory : Call The "Browse Folder" Dialog
Print this page