我正在學習ADO.NET,現在我正在嘗試理解SqlDataReader。我用this tutorial努力學習,我在理解代碼的以下部分,現在面臨一些困難提到HERE:以下代碼行的含義是什麼?
while (rdr.Read())
{
// get the results of each column
string contact = (string)rdr["ContactName"];
string company = (string)rdr["CompanyName"];
string city = (string)rdr["City"];
// print out the results
Console.Write("{0,-25}", contact);
Console.Write("{0,-20}", city);
Console.Write("{0,-25}", company);
Console.WriteLine();
}
我想了解的意思是「{0,} -25」
感謝您的幫助。對此,我真的非常感激。 – user1395782