Med*_*Man 21 .net c# visual-studio
你能编写一个方便的代码行来打印数组的内容吗?
我将在Visual Studio 2008的立即窗口中使用它,所以它必须在该窗口中工作.我可能已经遗漏了一些要求,但这正是我想要做的.
BFr*_*ree 31
myArray.ToList().ForEach(Console.WriteLine);
Run Code Online (Sandbox Code Playgroud)
Honestly though, I don't think that'll work in the immediate window. It is a nice trick to print it all in one line, but I think for the immediate window, all you need is this:
? myArray
Run Code Online (Sandbox Code Playgroud)
Ben*_*esh 12
我用:
BitConverter.ToString(bytes); //output: 4A-0B-11-13 etc.
Run Code Online (Sandbox Code Playgroud)
可怜的BitConverter,总是被遗忘.
String.Join("; ", myArray);
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
30981 次 |
最近记录: |