Hi,
I am getting "Structs cannot contain explicit parameterless constructor" error during build but i am able to compile the program with errors.
struct Program
{
string Name;
string Degree;
string Dpthead;
//Constructor
public Program ()
{
Console.WriteLine("Enter the Program's Name: ");
Name = Console.ReadLine();
Console.WriteLine("Enter the Program's Degree Name: ");
Degree = Console.ReadLine();
Console.WriteLine("Enter the Head of Program : ");
Dpthead = Console.ReadLine();
}
public void PrintUProgramDetails()
{
Console.WriteLine("Program Name: {0} from {1}. Enrolled in {2} degree(s)", Name, Degree, Dpthead);
}
}
What are the possible ways to correct this error? Any help or guidance.