我在我的程序的代码块中收到此错误.我正在使用c#和.net 2.0.它在代码的第一行中以十进制= 2显示此错误.请帮忙
private string formatSizeBinary(Int64 size, Int32 decimals = 2)
{
string[] sizes = { "Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
double formattedSize = size;
Int32 sizeIndex = 0;
while (formattedSize >= 1024 & sizeIndex < sizes.Length)
{
formattedSize /= 1024;
sizeIndex += 1;
}
return string.Format("{0} {1}", Math.Round(formattedSize, decimals).ToString(), sizes[sizeIndex]);
}
Run Code Online (Sandbox Code Playgroud) 此错误出现在vb代码的以下行中
rs.Open "select * From Reservation where [table_number]=tablenumber.text and booking_date=bookingdate.Text", cn, adOpenStatic, adLockPessimistic
Run Code Online (Sandbox Code Playgroud)