Normally working with string is very important function in most of the applicatons. VB.NET String comparison method is very simple and handy. You can use it anytime you need to compare two strings variables. The parameter for this is "String". Compare method is the first thing you want to compare with the string to be compared. Here the boolean value will determine that this should be considered in comparison. If you want to ignore case then specify True. For the check to include the case then specify False.
Code:
Private Sub CompareStrings()
Dim str1, str2 As String
str1 = "go4expert"
str2 = "GO4expert"
MessageBox.Show(String.Compare(str1, str2, False))
MessageBox.Show(String.Compare(str1, str2, True))
End Sub
Bookmarks