1
我即將開始一個項目,這裏是我目前的歡迎屏幕。居中readline語句
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]);
}
我該如何居中讀取的行?這樣當用戶選擇他們的選擇時也會居中呢?
「並點擊Enter」 - >我很好奇你將如何處理:) – TweeZz