Removing Dashes from a String

jwfulton

New member
Joined
Feb 18, 2009
Messages
3
Programming Experience
10+
I have a String that looks like 00-00-00-B3 and I need to remove the dashes from it so it looks like 000000B3. Does anybody have a suggestion or a solution?

Jim
 
String Replace?

String.Replace("-", "")?

Can you be a little more specific.. I am putting this in a vb.net code. Paramaters?

Thanks,

Jim
 
VB.NET:
	Private Sub uxRemoveDashes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
	Handles uxRemoveDashes.Click

		MessageBox.Show(RemoveDashes("00-00-00-B3"))

	End Sub

	Private Function RemoveDashes(ByVal input As String) As String

		Return input.Replace("-", "")

	End Function
 
Back
Top