Im pretty new to programming so i dont know much myself other than what we've done in my into c# class so far but i've looked pretty much everywhere for a way to condense readlines so that the program will read many inputs in a row without having to code a readline for every variable the user is inputting for.
Console.WriteLine("Enter ID for Jane Doe: ");
c.ID = Console.ReadLine();
Console.WriteLine("Enter Insurance Name for Jane Doe: ");
c.Insurance = Console.ReadLine();
Console.WriteLine("Enter Height(In.) for Jane Doe: ");
c.Height = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter Weight(lbs.) for Jane Doe: ");
c.Weight = Convert.ToSingle(Console.ReadLine());
Console.WriteLine("Enter Health Status for Jane Doe: ");
c.HealthStatus = Console.ReadLine();
This example is from some homework from a little bit ago but it bothered me that I couldn't find a way to condense the code. Basically I want to be able to ask for all the information in one writeline and then only use one readline/other method for the input of each variable where the user types the info for one variable, hits enter, then repeats however often is needed. Is there any way to do that or do i just have to deal with the repetition?