I'm a beginner at C# and I need some help regarding this problem. How do I make this code work? I want it to accept user input by entering names and grades and then get it automatically sorted. I tried and looked for many tutorials, but they don't cover the 2D array topic that sorts items that much.
For the part of Array.Sort(g); I can run this code but it gets error on this part.
I appreciate any help and correction :)
namespace ConsoleApp8
{
class Program
{
static void Main(string[] args)
{
string[,] g = new string[10,2];
Console.WriteLine("Names and their Prelim GWA: ");
for (int i = 0; i <= 10; i++)
{
Console.ReadLine();
}
Array.Sort(g);
Console.ReadKey();
}
}
}