VB.Net Strings.StrComp()


Strings.StrConv(ByVal String1 As String, ByVal String2 As String, Optional ByVal Compare As Microsoft.VisualBasic.CompareMethod = Binary) As Integer
Summary:
Returns -1, 0, or 1, based on the result of a string comparison.

Return Values :
If String1 sorts ahead of String2, StrComp returns -1. If String1 is equal to String2, StrComp returns 0. If String1 sorts after String2, StrComp returns 1. 

Ex : 

Strings.StrComp("vbcodesblog", "vbcodes")) returns 1 (False)


 Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button1.Click
        MsgBox(Strings.StrComp("vbcodesblog", "vbcodes"))
    End Sub
 End Class


When you execute this code, you will get 1 (its mean False) in the MessageBox.
Anda baru saja membaca artikel yang berkategori VB.Net dengan judul VB.Net Strings.StrComp(). Anda bisa bookmark halaman ini dengan URL http://vbcodesblog.blogspot.com/2011/04/vbnet-stringsstrcomp.html. Terima kasih!
Ditulis oleh: Farray Cool - Monday, April 05, 2010

Belum ada komentar untuk "VB.Net Strings.StrComp()"

Post a Comment