VB.Net Replace()

Replace(ByVal Expression As String, ByVal Find As String, ByVal Replacement As String) As String
Returns a string in which a specified substring has been replaced with another substring a specified number of times.

Return Values :
If Find is zero-length or Nothing, Replace returns copy of Expression. If Replace is zero-length, Replace returns copy of Expression with no occurrences of Find. If Expression is zero-length or Nothing, or Start is greater than length of Expression, Replace returns Nothing. If Count is 0, Replace returns copy of Expression.


Ex : 

Replace("vbcodesblog", "blog", "") returns vbcodes



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


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 Replace(). Anda bisa bookmark halaman ini dengan URL http://vbcodesblog.blogspot.com/2010/04/vbnet-replace.html. Terima kasih!
Ditulis oleh: Farray Cool - Friday, April 09, 2010

Belum ada komentar untuk "VB.Net Replace()"

Post a Comment