C#中的String.Format()参数的一种用法
2008-11-29 14:25
239 查看
String.Format()方法是用来格式化字符串的。
在指定字符串中的参数时,多处引用可以来自同一个参数。
例如:
String sql=String.Format("select {0},count({0} as num from {1})",columnName,tableName);
在指定字符串中的参数时,多处引用可以来自同一个参数。
例如:
String sql=String.Format("select {0},count({0} as num from {1})",columnName,tableName);
相关文章推荐
- Android中String资源文件的可变参数设定(String.format()的详细用法)
- [C#]String.Format格式化的用法
- C# String.Format用法和格式说明
- mysql 存储过程中 limit之后使用分页变量,传入分页参数. 类似于微博游标分批次获取信息;问号参数类似于c#的string.format;问号占位符
- C# String.Format用法和格式说明
- C# String.Format用法和格式说明
- C#:String.Format 方法 (String, Object)的用法
- C# stringbuilder的基本用法 sb.AppendFormat
- C# ToString()方法 带参数的特殊用法
- C# String.Format用法和格式说明
- C# string.format用法
- c# dataformatstring 的一些用法
- C# 中 String.Format() 的简单用法(转)
- C# String.Format用法和格式说明
- WPF中StringFormat的用法可以参照C#中string.Format的用法
- C#的String.Format格式化参数
- 发现C#中的string.format的一个新用法
- Java String.Format() 方法及参数说明
- C# String.Format格式说明
- String.format(*args, **kwargs)用法