Public Class Tester
Public Shared Sub Main
Dim result As New System.Text.StringBuilder
Dim testDouble As Double = Math.PI
result.Append("Double ").AppendLine(testDouble)
testDouble += Math.PI
result.Append("+= ").AppendLine(testDouble)
testDouble *= Math.PI
result.Append("*= ").AppendLine(testDouble)
testDouble -= Math.PI
result.Append("-= ").AppendLine(testDouble)
testDouble /= Math.PI
result.Append("/= ").AppendLine(testDouble)
testDouble ^= Math.PI
result.Append("^= ").AppendLine(testDouble)
result.AppendLine()
Dim testInteger As Integer = 17
result.Append("Integer ").AppendLine(testInteger)
testInteger \= 2
result.Append("\= 2 ... ").AppendLine(testInteger)
testInteger += 1
result.Append("+= 1 ... ").AppendLine(testInteger)
testInteger <<= 1
result.Append("<<= 1 ... ").AppendLine(testInteger)
testInteger >>= 3
result.Append(">>= 3 ... ").AppendLine(testInteger)
result.AppendLine()
Dim testString As String = "Abcdef"
result.Append("String ").AppendLine(testString)
testString &= "ghi"
result.Append("&= ghi ... ").AppendLine(testString)
testString += "jkl"
result.Append("+= jkl ... ").AppendLine(testString)
Console.WriteLine(result.ToString())
End Sub
End Class
|