Compare two strings for character case- VB.NET

Tags: VB.NET, VB 2008, VB 2010, VB 2012, VB 2013

The following function checks if two strings match for charater case

Dim word1 As String = "ViSuAL bASiC"

Dim word2 As String = "Visual Basic"

'Compare character case:

If String.Compare(word1, word2, False) = 0 Then

    MsgBox("String Match")

Else

    MsgBox("String Does not Match")

End If

visual basic .net compare strings


Share This

Home | About | Contact | Privacy Policy

Copyright visual-basic-tutorials.com 2017 - All Rights Reserved.