До «cd Lab_Handler» из командной строки мне приходилось подключаться к подключенному сетевому диску из командной строки, то есть
net use \\MYIP\UAT\Handlers
После выполнения команды, упомянутой выше, было бы предложено ввести имя пользователя и пароль для установления соединения
А потом я смог «cd Lab_handler», как и любой другой нормальный каталог
You could do something like the following:
static int tableWidth = 77;
static void PrintLine()
{
Console.WriteLine(new string('-', tableWidth));
}
static void PrintRow(params string[] columns)
{
int width = (tableWidth - columns.Length) / columns.Length;
string row = "|";
foreach (string column in columns)
{
row += AlignCentre(column, width) + "|";
}
Console.WriteLine(row);
}
static string AlignCentre(string text, int width)
{
text = text.Length > width ? text.Substring(0, width - 3) + "..." : text;
if (string.IsNullOrEmpty(text))
{
return new string(' ', width);
}
else
{
return text.PadRight(width - (width - text.Length) / 2).PadLeft(width);
}
}
Use String.Format with alignment values.
For example:
String.Format("|{0,5}|{1,5}|{2,5}|{3,5}|", arg0, arg1, arg2, arg3);
To create one formatted row.