In VBA the split function can be used to split a string and get a particular element in one line using
'Get 4th element of split directly
spElement = Split(someString,",")(3)
Is there a similar way of doing this in C#? I’ve seen examples of using LINQ Last() like this
spElement = someString.Split(',').Last();
But is it possible to get an actual element of the split array by number?
You get a specific position in arrays using
[]in c#For more information, check this Arrays Tutorial on MSDN