Jagged array in C#

Dec 14 2011 1:31 AM
Hai sir

        I want know for loop explanation in jagged array...in this loop i want "(j == (intJaggedArray[i].Length - 1) ? "" : "")" meaning & usage of this....Plz tell me !


for (int i = 0; i < intJaggedArray.Length; i++)
           {
               System.Console.Write("element({0}):", i);
               for (int j = 0; j < intJaggedArray[i].Length; j++)
               {
                   System.Console.Write("{0}{1}", intJaggedArray[i][j], j == (intJaggedArray[i].Length - 1) ? "" : "");
               }
               System.Console.WriteLine();


Answers (2)