请问如下代码中?:{0:d}和{0:string str1=String.Format("(d)Short date:{0:d}\n",DateTime.Now);string str2 =String.Format("(C)Currency:{0:C}\n",89.0f);

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 21:57:42

请问如下代码中?:{0:d}和{0:string str1=String.Format("(d)Short date:{0:d}\n",DateTime.Now);string str2 =String.Format("(C)Currency:{0:C}\n",89.0f);
请问如下代码中?:{0:d}和{0:
string str1=String.Format("(d)Short date:{0:d}\n",DateTime.Now);
string str2 =String.Format("(C)Currency:{0:C}\n",89.0f);

请问如下代码中?:{0:d}和{0:string str1=String.Format("(d)Short date:{0:d}\n",DateTime.Now);string str2 =String.Format("(C)Currency:{0:C}\n",89.0f);
格式化字符
{0:d} 应该是转化成日期型
{0:C}应该是转化成货币型