What's the best way to format a string so that everything before the last "\" is deleted?
Printable View
What's the best way to format a string so that everything before the last "\" is deleted?
Code:
Dim strTemp As String
Dim intStart As Integer = 0
strTemp = TextBox1.Text
intStart = strTemp.LastIndexOf("\")
MessageBox.Show(strTemp.Substring(intStart + 1))
VB Code:
MessageBox.Show(s.Substring(s.LastIndexOf("\") + 1, s.Length - s.LastIndexOf("\") - 1))
:) yes im a snot