【发布时间】:2014-11-09 20:54:08
【问题描述】:
此时,我正在开发一个脚本,它将获取员工信息并以特定方式显示信息。在这种情况下,我尝试使用 `.ToString' 方法,以便保持输入显示在 上相同行 没有创建新行 我知道这很简单,但是我不熟悉显示的错误。任何帮助将不胜感激。
代码示例:
Console.WriteLine("********* Prompt for Employee information and create first employee **********");
Console.WriteLine("");
Console.WriteLine("Enter the First name: ");
Console.Write(line.ToString());
if (line.Contains("x"))
{
Console.WriteLine("Enter the Last name: ");
line2 = Console.ReadLine();
//Rest of Code Follows Same Flow...
【问题讨论】:
-
如何初始化
line?
标签: c# syntax-error unassigned-variable