.NET Array Dictionary List String Sub ArrayList Cast Class Console Dates DataTable DateTime Enum File For Format If IndexOf Lambda LINQ Nothing Parse Process Property Regex Replace Select Sort Split StringBuilder SubstringToUpper converts all characters to uppercase characters. It causes a copy to be made of the VB.NET String, which is returned. We look at ToUpper and its behavior on non-lowercase characters.
Also: Characters that are already uppercase are not changed by the ToUpper Function.Char
VB.NET program that calls ToUpper on String Module Module1 Sub Main() Dim value1 As String = "r2d2" Dim upper1 As String = value1.ToUpper() Console.WriteLine(upper1) End Sub End Module Output R2D2Uppercased. How can you determine if a String is already uppercase? This is possible by using ToUpper and then comparing the results of that against the original String. If they are equal, the string was already uppercased.
Finally: We noted how to test Strings with a For-loop to see if they are uppercase.