我即将开始一个项目,这是我目前在欢迎屏幕上的内容.
string[] welcome = new string[4]
{
"Welcome",
"Choose A Option Bellow By Inputing The Number And Clicking Enter.",
"1. View C:\\Windows\\ File directory",
"2. View Your Own Custom Directory"
};
string userChoice;
for (int x = 0; x < 4; x++)
{
Console.WriteLine(
"{0," + ((Console.WindowWidth / 2) + welcome[x].Length / 2) + "}", welcome[x]);
}
Run Code Online (Sandbox Code Playgroud)
我如何集中我的读取线?那么当用户选择他们的选择时也会居中?