decimal Debitvalue = 1156.547m;
decimal DEBITAMT = Convert.ToDecimal(string.Format("{0:0.00}", Debitvalue));
Run Code Online (Sandbox Code Playgroud)
我必须得到两个小数位,但通过使用此代码我得到1156.547.让我知道我必须使用哪种格式来显示两位小数.
我无法在DataGridView上显示货币格式.你能看看这段代码.
private void dataGridView1_DataBindingComplete(object sender,
DataGridViewBindingCompleteEventArgs e)
{
objPreview.dataGridView1.Columns["Debit"].DefaultCellStyle.Format = "c";
objPreview.dataGridView1.Columns["Credit"].DefaultCellStyle.Format = "c";
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用命令提示符以静默模式运行 xxx.exe 文件。我在谷歌中看到了这个链接: http: //www.powerware.com/Software/lansafe_help/LSHelp424.htm。
当我运行此命令时: C:>"D:\xxx.exe" -r -f1"D:\Test.iss" 收到错误:“xxx.exe”未被识别为内部或外部命令可操作程序或批处理文件。
任何人都可以告诉我我在哪里做错了吗?