say if I have a string 010451-09F2
How to I get left of - from the above string in vb.net
I want 010451
The left fu
Dim str As String = "010451-09F2" Dim leftPart As String = str.Split("-")(0)
Split gives you the left and right parts in a string array. Accessing the first element (index 0) gives you the left part.