| Conditional | VBA | C SHARP | JAVA |
| DO | Do 'put code here Loop While Not rs.EOF | Do { //put code here } While(!rs.EOF); | Coming Soon |
| For | For i = 1 to 10 Next i |
int x = 0; for (int x = 0; x <= 10; x++); |
Coming Soon |
| Switch |
Dim myVar as integer
myVar = 1 Select Case myVar case 0 MsgBox "You selected " & myVar case 1 MsgBox "You selected " & myVar case else End Select |
int myVar = 1;
string myString = null; Switch (myVar) { case 0: MessageBox.Show("You selected " + Convert.ToInt32(myVar)) case 1: MessageBox.Show("You selected " + Convert.ToInt32(myVar)) default: MessageBox.Show("You selected " + Convert.ToInt32(myVar)) }
|
Coming Soon |
| If | If x = y then MsgBox "True" Else MsgBox "False" End If |
if (myPos>-1) { startPos=myPos+1; count++; } |
Coming Soon |
|
Methods |
|||
| Create Text File | On
Error goto Err_myEvent_Click:
Dim strTest as string open "c:\test1.txt" for output as #1 strTest = "Los Angeles" Write #1, strTest close #1 Exit_myEvent_Click: Err_myEvent_Click: MsgBox "Error " & err.number 4& " " & err.description Resume Exit_myEvent_Click: |
StreamWriter
myStreamWriter = null; |
Coming Soon |
| Database | |||
| SQL Connection |
Dim cnn As ADODB.Connection
Set cnn = New ADODB.Connection cnn.ConnectionString = "Provider=SQLOLEDB;Data Source=serverName;Initial Catalog='dbName';Integrated Security='SSPI';" cnn.ConnectionTimeout = 5 cnn.open |
SqlConnection
conn = new SqlConnection("User ID=;password=;Initial Catalog=dbName;Server=
serverName;
integrated security = sspi"); |
Coming Soon |
| String Manipulation | |||
| Mid | |||
| Right | |||
| Left | |||
| Format | |||
| Concatenation | |||
| Substring | |||
| IndexOf | |||
| Split | |||
| Instr | |||
| Length | |||
| Miscellaneous | |||
| Message Box | Select Case MsgBox ("Your order appears to be correct." & chr(10) & "Continue on?" , vbYesNoCancel,'Save Document") case vbYes case vbNo case vbCancel End Select |
MessageBox.Show("Your
order appears to be correct" +
"\n Continue on?",
"Save Document",
MessageBoxButtons.YesNoCancel,
MessageBoxIcon.Information,
MessageBoxDefaultButton.Button1);
|
Coming Soon |
|
This site hopes to give credit where credit is due. We are all learning! |
|||
|
|
||