Console App (C#) Multiple Variables and Inputting New Variables in VS and the Console Window

  • Thread starter Thread starter Sebastian 001
  • Start date Start date
S

Sebastian 001

Guest
How can this code be modified to make it so I can assign the variables values after the variables have been declared?

Once that is answered: How can I modify it using the .NET Framework Console.ReadLine()?

That means I would like to be able to specify a new student name, teacher name, all of that, etc. in the Console Window as

an application. Please help me out. Thanks!!!!!

CODE:

using System;

namespace Self_Assesment_Lab_again
{
class Program
{
static void Main(string[] args)
{
//create variables of different data types
//output to console window
string StudentFirstName = "Freddy";
string StudentLastName = "McCoi";
string StudentBirthDate = "February 1st, 2001";
string StudentAddressLine1 = "376 Tiddy Street";
string StudentAddressLine2 = "None";
string StudentCity = "Kalamazoo";
string StudentStateOrProvince = "Illinois";
string StudentZipOrPostal = "50021";
string StudentCountry = "U.S.A.";
string TeacherFirstName = "Truth";
string TeacherLastName = "Sequence";
string TeacherBirthDate = "September 19th, 1979";
string TeacherAddressLine1 = "1201 Firsting Street";
string TeacherAddressLine2 = "None";
string TeacherCity = "Freddy Washington";
string TeacherStateOrProvince = "Illinois";
string TeacherZipOrPostal = "50033";
string TeacherCountry = "U.S.A.";
string UProgramName = "Commanding";
string DepartmentHead = "Symphony";
string Degrees = "MBA";
string DegreeName = "BS";
string CreditsRequired = "40";
string CourseName = "Commanding Frequents";
string Credits = "40";
string DurationInWeeks = "144";
string Teacher = "Sequence";

Console.WriteLine(StudentFirstName);
Console.WriteLine(StudentLastName);
Console.WriteLine(StudentBirthDate);
Console.WriteLine(StudentAddressLine1);
Console.WriteLine(StudentAddressLine2);
Console.WriteLine(StudentCity);
Console.WriteLine(StudentStateOrProvince);
Console.WriteLine(StudentZipOrPostal);
Console.WriteLine(StudentCountry);
Console.WriteLine(TeacherFirstName);
Console.WriteLine(TeacherLastName);
Console.WriteLine(TeacherBirthDate);
Console.WriteLine(TeacherAddressLine1);
Console.WriteLine(TeacherAddressLine2);
Console.WriteLine(TeacherCity);
Console.WriteLine(TeacherStateOrProvince);
Console.WriteLine(TeacherZipOrPostal);
Console.WriteLine(TeacherCountry);
Console.WriteLine(UProgramName);
Console.WriteLine(DepartmentHead);
Console.WriteLine(Degrees);
Console.WriteLine(DegreeName);
Console.WriteLine(CreditsRequired);
Console.WriteLine(CourseName);
Console.WriteLine(Credits);
Console.WriteLine(DurationInWeeks);
Console.WriteLine(Teacher);







}
}
}

Continue reading...
 
Back
Top