for (int m = 0; m <cName.Length; m++)
        {
            Console.WriteLine("{0}         {1}          {2}",cName, cMarks, cGrade);  
        }

i want to print the values of Arrays which are cName, cMarks, cGrade respectively. but em not able to print.

Recommended Answers

All 2 Replies

for (int m = 0; m < cName.Length; m++) {
    Console.WriteLine("{0} {1} {2}", cName[m], cMarks[m], cGrade[m]);
}
for (int m = 0; m < cName.Length; m++) {
    Console.WriteLine("{0} {1} {2}", cName[m], cMarks[m], cGrade[m]);
}

Thnkz bro itz worked...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.