Mega Code Archive

 
Categories / VB.Net Tutorial / Data Type
 

Char

Public Class Tester     Public Shared Sub Main         Dim result As New System.Text.StringBuilder         Dim counter As Integer         Dim testChar As Char         Dim testHex As String         For counter = 0 To 127             testChar = Chr(counter)             testHex = "\x" & Hex(counter)             If Char.IsPunctuation(testChar) Then _                result.AppendLine(testHex & "   IsPunctuation")             If Char.IsSeparator(testChar) Then _                result.AppendLine(testHex & "   IsSeparator")             If Char.IsSymbol(testChar) Then _                result.AppendLine(testHex & "   IsSymbol")             If Char.IsUpper(testChar) Then _                result.AppendLine(testHex & "   IsUpper")             If Char.IsWhiteSpace(testChar) Then _                result.AppendLine(testHex & "   IsWhiteSpace")         Next counter         Console.WriteLine(result)     End Sub End Class \x9 IsWhiteSpace \xA IsWhiteSpace \xB IsWhiteSpace \xC IsWhiteSpace \xD IsWhiteSpace \x20 IsSeparator \x20 IsWhiteSpace \x21 IsPunctuation \x22 IsPunctuation \x23 IsPunctuation \x24 IsSymbol \x25 IsPunctuation \x26 IsPunctuation \x27 IsPunctuation \x28 IsPunctuation \x29 IsPunctuation \x2A IsPunctuation \x2B IsSymbol \x2C IsPunctuation \x2D IsPunctuation \x2E IsPunctuation \x2F IsPunctuation \x3A IsPunctuation \x3B IsPunctuation \x3C IsSymbol \x3D IsSymbol \x3E IsSymbol \x3F IsPunctuation \x40 IsPunctuation \x41 IsUpper \x42 IsUpper \x43 IsUpper \x44 IsUpper \x45 IsUpper \x46 IsUpper \x47 IsUpper \x48 IsUpper \x49 IsUpper \x4A IsUpper \x4B IsUpper \x4C IsUpper \x4D IsUpper \x4E IsUpper \x4F IsUpper \x50 IsUpper \x51 IsUpper \x52 IsUpper \x53 IsUpper \x54 IsUpper \x55 IsUpper \x56 IsUpper \x57 IsUpper \x58 IsUpper \x59 IsUpper \x5A IsUpper \x5B IsPunctuation \x5C IsPunctuation \x5D IsPunctuation \x5E IsSymbol \x5F IsPunctuation \x60 IsSymbol \x7B IsPunctuation \x7C IsSymbol \x7D IsPunctuation \x7E IsSymbol