Can you cast a List
to List
somehow?
I know I could loop through and .ToString() the thing, but a cast would be aw
Is C# 2.0 able to do List
? If so, I think your best guess would be to use that with a delegate:
List list = new List();
list.Add(1);
list.Add(2);
list.Add(3);
list.Convert(delegate (int i) { return i.ToString(); });
Something along those lines.
Upvote Glenn's answer, which is probably the correct code ;-)