演员表<int>列出<string>在 .NET 2.0 中 - Cast List<int> to List<string> in .NET 2.0

问题:

Can you cast a List<int> to List<string> somehow?你能以某种方式将List<int>List<string>吗?

I know I could loop through and .ToString() the thing, but a cast would be awesome.我知道我可以遍历和 .ToString() 的东西,但演员会很棒。

I'm in C# 2.0 (so no LINQ ).我在 C# 2.0 中(所以没有LINQ )。


解决方案:

参考: https://stackoom.com/en/question/Bgs
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章