I have the simplest VB code:
Dim test As String = "DDN8057"
Console.WriteLine(test.TrimStart("DDN"))
gives me
N8057
Why? Converting this to C# (which I'm far more familiar with), made me realize that TrimStart
actually expects a params char[]
, but running
Console.WriteLine("DDN8057".TrimStart("DDN".ToCharArray()));
gives me my expected
8057
So, I guess VB is capable of treating a string as a char array internally (is this true?), but why the discrepancy in my output?