VB.NET String Substring()


Substring(ByVal startIndex As Integer, ByVal length As Integer) As String
Retrieves a substring from this instance. The substring starts at a specified character position and has a specified length.

Return Values :
A System.String equivalent to the substring of length length that begins at startIndex in this instance, or System.String.Empty if startIndex is equal to the length of this instance and length is zero.

Ex :


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click



        Dim Str As String = "vbcodesblog"


        MsgBox(Str.Substring(0, 7))

End Sub


When you execute this code, you will get vbcodes in the MessageBox
Anda baru saja membaca artikel yang berkategori VB.Net dengan judul VB.NET String Substring(). Anda bisa bookmark halaman ini dengan URL http://vbcodesblog.blogspot.com/2012/08/vbnet-string-substring.html. Terima kasih!
Ditulis oleh: Unknown - Sunday, August 05, 2012

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

Post a Comment