[Solved] Getting a very unusual error to me, I am new to programming keep in mind [closed]


The line

Student =Console.ReadLine(); //where I am getting an error

fails because Console.ReadLine() returns a string, but you are attempting to assign it to a variable of type Student (the variable is confusingly also called Student).

There is no way for the compiler to convert a string to the type Student.

It looks like you intend that line to be

firstName = Console.ReadLine();

based on the structure of the rest of the code.

solved Getting a very unusual error to me, I am new to programming keep in mind [closed]