Reputation: 917
I have a foreach statement that I generate a collection by splitting up a text file at each "\r\n" or "\n" as follows:
foreach (var value in baiTxt.Split(new[] {"\r\n", "\n"}, StringSplitOptions.None)){ do work;}
When I try to add a Watch on baiTxt.Split(new[] {"\r\n", "\n"}, StringSplitOptions.None) I get the error "Expression cannot contain implicitly-typed arrays.
Can someone point me in the right direction please?
Upvotes: 2
Views: 1042
Reputation: 1147
Replace this code segment.
baiTxt.Split(new[] {"\r\n", "\n"}, StringSplitOptions.None)
for
baiTxt.Split(new string[] {"\r\n", "\n"}, StringSplitOptions.None)
Upvotes: 3