字符串格式化提示参数格式错误
摘要:string str = " aaaa {CreateTemplateTime} {0}";string.Format(str,aaa);报错 字符串格式化提示参数格式错误原因{CreateTemplateTime} 用了 "{}" 里面没有用整型 而用了 字符串占位符 所以提示参数格式 错误
阅读全文
posted @
2012-01-14 17:04
﹎蓝言觅ぷ雨
阅读(364)
推荐(0)
字符串参数格式化 string.Format和string.Replace 选择使用的一些想法
摘要:小篇幅字符串格式化 建议用 string.Format如 string str = @"Title:{0} Name:{1} Content:{2}";使用string.Format 格式化参数列 参数用意简单明了大篇幅字符串格式化 建议用string.Replace如 string str = @"create proc [{PrefixName}{ApplicationName}_AddUpdate] {ParameterColumns}@ID int,11111111111111111111111111 AS IF EXISTS(SELECT [{strPr
阅读全文
posted @
2012-01-14 09:45
﹎蓝言觅ぷ雨
阅读(1919)
推荐(0)