C# Programming
04-27-2010, 12:31 AM
Hi all,
Can someone let me know what is happening with the following line of code? I don't understand the syntax used in after j == (arr[i].Length - 1)
Specifically what's happening with ? "" :
I do know what " " is doing at the very end.
System.Console.Write("{0}{1}", arr[i][j], j == (arr[i].Length - 1) ? "" : " ");
Can someone let me know what is happening with the following line of code? I don't understand the syntax used in after j == (arr[i].Length - 1)
Specifically what's happening with ? "" :
I do know what " " is doing at the very end.
System.Console.Write("{0}{1}", arr[i][j], j == (arr[i].Length - 1) ? "" : " ");