String.Compare : String « System « VB.Net by API






String.Compare

  
Imports System
Imports System.Collections

Public Class MainClass
    
    Shared Sub Main()
             Dim s1 As String = "abcd"
             Dim s2 As String = "ABCD"
             Dim result As Integer 

             result = String.Compare(s1, s2)
             Console.WriteLine( _
               "compare s1: {0}, s2: {1}, result: {2}" _
               & Environment.NewLine, s1, s2, result)

             result = String.Compare(s1, s2, True)
             Console.WriteLine("Compare insensitive. result: {0}" _
                & Environment.NewLine, result)
   End Sub

End Class

   
    
  








Related examples in the same category

1.String.Concat
2.String.Copy
3.String.Empty
4.String.Equals
5.String.Format
6.String.GetEnumerator
7.String.GetHashCode()
8.String.IndexOf(String substring)
9.String.IndexOfAny(String sub)
10.String.IndexOfAny(String sub, Int count)
11.String.Insert
12.String.IsNullOrEmpty
13.String.LastIndexOf
14.String.PadLeft(Int length)
15.String.PadLeft(Int length, String char)
16.String.Replace
17.String.Split
18.String.StartsWith
19.String.Substring(Int begin)
20.String.Substring(Int begin, Int end)
21.String.ToCharArray()
22.String.ToLower()
23.String.ToUpper()