VB.NET String Contains()

Contains(ByVal value As String) As Boolean
Returns a value indicating whether the specified System.String object occurs within this string.

Return Values :
true if the value parameter occurs within this string, or if value is the empty string (""); otherwise, false.

Ex : 

 Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button1.Click
       Dim Str As String = "vbcodesblog"
        If Str.Contains("codes") Then
        End If
    End Sub
 End Class

When you execute this code, you will get True in the MessageBox
Anda baru saja membaca artikel yang berkategori VB.Net dengan judul VB.NET String Contains(). Anda bisa bookmark halaman ini dengan URL http://vbcodesblog.blogspot.com/2010/04/vbnet-string-contains.html. Terima kasih!
Ditulis oleh: Farray Cool - Saturday, April 10, 2010

Belum ada komentar untuk "VB.NET String Contains()"

Post a Comment