当我Console.Write在对象初始化程序中使用时,我收到此错误
错误CS0747初始化程序成员声明符无效
person[i] = new Karmand()
{
Console.Write("first name:"),
FirstName = Console.ReadLine(),
LastName = Console.ReadLine(),
ID = Convert.ToInt32(Console.ReadLine()),
Hoghoogh = Convert.ToDouble(Console.ReadLine())
};
Run Code Online (Sandbox Code Playgroud)