String Firstname, Lastname;
Char Gender = 'm';
Console.WriteLine("Cis247a, Week 2 Lab");
Console.WriteLine("Name: Kyle Landell");
Console.WriteLine("This program accepts user input as a string, then makes the" + Environment.NewLine + "appropriate data conversion and assigns the value to Employee objects");
Console.WriteLine("*********Start Program*********" + Environment.NewLine + Environment.NewLine);
Console.WriteLine("*********Prompt for Emplotee information*********" + Environment.NewLine);
Console.WriteLine("Enter the First name: ");
Firstname = Console.ReadLine();
Console.WriteLine("Enter the Last name: ");
Lastname = Console.ReadLine();
Console.WriteLine("Enter the Gender (M or F): ");
Gender.ToString() = Console.ReadLine();
Console.ReadLine();
これは私が持っているコードです。でエラーが発生しますGender.ToString() = Console.ReadLine();
。エラーは、左側に変数が必要だと言っています。性別は変数ではありませんか?