EndsWith – Check whether a string ends with one of multiple possible choices
‘ Check whether a string ends with one of multiple possible choices.’ Return -1 if no possible string matches the end of the source,’ otherwise return the index of the
‘ Check whether a string ends with one of multiple possible choices.’ Return -1 if no possible string matches the end of the source,’ otherwise return the index of the
‘ Assign the same transaction to the Update/Delete/Insert commands of all the ‘ OleDb/SqlAdapters passed in input’ Note: all the DataAdapters must be of the same type (OleDb or Sql)’
‘ Add or remove an event handler through reflection,’ and return True if successful” Examples:’ ‘ add an event handler for Button1’s Click event’ AddRemoveEventHandler(Button1, “Click”, New EventHandler(AddressOf ‘ OnButton1Click))’
‘ Retrieve the installed MDAC version” Examples:’ Dim ver As Version = GetMdacVersion()’ ‘ print the full version’ MessageBox.Show(ver.ToString())’ ‘ print the major and minor portions’ MessageBox.Show(“Major: ” & ver.Major
Private Shared _ Function GetAsyncKeyState(ByVal key As Keys) As IntegerEnd Function’ Check whether a key is pressed, at any given time’ Example: MessageBox.Show(IsKeyPressed(Keys.A))Function IsKeyPressed(ByVal key As Keys) As Boolean Return
‘ Check whether a string starts with one of multiple possible choices.’ Return -1 if no possible string matches the start of the source,’ otherwise return the index of the
Assertions are excellent at catching bugs during development. However, some checks need to be performed at runtime for production code as well. A good way to wrap the two is
Where possible, use interfaces (as opposed to interface-implementation classes) to increase your source code’s flexibility. If you later need to change an interface-implementation class (to improve performance, for example), it’s