Hi,
I have a problem with trimming character from the start of a string. This is the code I have
For Each i As String In lstSearch.Items
Dim MyString As String = i
Dim MyChar() As Char = {"\", "\", "1", "9", "2", ".", "1", "6", "8", ".", "6",, "\", "m", "y", "s", "h", "a", "r", "e", "_", "P", "r", "o", "d", "u", "c", "t", "i", "o", "n", "$", "\"}
Dim newstring1 As String = MyString.TrimStart(MyChar)
lstResults.Items.Add(newstring1)
Next
Its part of searchng a directory for a file. The file is named something like this
AG000000_Share_Local_9_Reference.zip
But when I use the trim on it it always removes the A at the start of the file name. So it becomes
G000000_Share_Local_9_Reference.zip
I can't figure out why it keeps trimming the first character of the file name when it should only be trimming
\\192.168.6\myshare_production$\
but always trims
\\192.168.6\myshare_production$\A
I'd be greatful if someone could help
Thanks
J