标签:orm osb string ant 多个 style 拼接字符串 使用 拼接
C# string.Format()用法例:
sting szNenryoSBTCD="abc";
Datarow[] drs = this.dtNenRyoDat.Select(string.Format("NENRYOU_SBT_CD = ‘{0}‘ ‘", szNenryoSBTCD));
string.Format("NENRYOU_SBT_CD = ‘{0}‘ ‘", szNenryoSBTCD) 就相当于 "NENRYOU_SBT_CD = ‘abc‘ ‘"
使用占位符{0}拼接字符串,多个占位符时将参数依次列在后面,如
dr = dt.Select(
string.Format("{0} = ‘{1}‘ AND (GYIUSYU_CD = ‘{2}‘ OR GYIUSYU_CD = ‘{3}‘)"
, szSGyomuKBN, this.szEGyoumuKbn, Consts.STR_CONSTANT_GYOUSYU_1, Consts.STR_CONSTANT_GYOUSYU_12)
, "TORIHIKISAKI_CD");
标签:orm osb string ant 多个 style 拼接字符串 使用 拼接
原文地址:http://www.cnblogs.com/xiaoxiaoshare/p/7196150.html