Compare two strings- VB.NET

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

The following function code if two strings are the same

Dim word1 As String = "ViSuAL bASiC"

Dim word2 As String = "Visual Basic Tutorials"

 If String.Compare(word1, word2, True) = 0 Then 'False to check case

    MsgBox("Strings Match")

Else

    MsgBox("Strings Do 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.