我在这里做错了什么?
string tmp = @"
if (UseImageFiles) {
vCalHeader += ""<td><img onmousedown='' src= '{0}cal_fastreverse.gif' width='13px' height='9' onmouseover='changeBorder(this, 0)' onmouseout='changeBorder(this, 1)' style='border:1px solid white'></td>\n""; //Year scroller (decrease 1 year)
calHeight += 22;
}";
string x = "xter";
tmp = string.Format(tmp, x);
我在尝试更改{0}
时,收到了“输入字符串格式不正确”的消息。这是在C#和WinForms中进行的操作。
格式异常未处理
输入字符串格式不正确
我得到的故障排除提示如下:
确保您的方法参数格式正确。当将字符串转换为日期时间时,请解析该字符串以取出日期,然后将每个变量放入DateTime对象之前。