我即将开始一个项目,这是我目前的欢迎屏幕。
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]);
}
我如何使我的阅读线居中?这样当用户选择时,他们的选择也会居中?