Case 1:

myString =Regex.Replace(myString,"/kg","",RegexOptions.IgnoreCase);

Case 2: If you're going to do this a lot of times, you could do:

// You can reuse this object

jimili 發表在 痞客邦 留言(0) 人氣()

Column names

If a column name contains any of these special characters ~ ( ) # \ / = > < + - * % & | ^ ' " [ ], you must enclose the column name within square brackets [ ]. If a column name contains right bracket ] or backslash \, escape it with backslash (\] or \\).

http://www.csharp-examples.net/dataview-rowfilter/

jimili 發表在 痞客邦 留言(0) 人氣()

List<string> lstSCol = new List<string>();
foreach (string sSC in sOutputColumn.Split(','))
    if (dtResult.Columns.Contains(sSC))
        lstSCol.Add(sSC);
for (int iS = 0; iS < lstSCol.Count; iS++)

jimili 發表在 痞客邦 留言(0) 人氣()

        private DataTable ConvertToTable(string sVal)
        {
            DataTable dt = new DataTable();
            if (sVal.Length > 0)
            {

jimili 發表在 痞客邦 留言(0) 人氣()

        private string ReadTextFileFromResource(string sFile)
        {
            string sRet = "";
            try
            {

jimili 發表在 痞客邦 留言(0) 人氣()

1
Blog Stats
⚠️

成人內容提醒

本部落格內容僅限年滿十八歲者瀏覽。
若您未滿十八歲,請立即離開。

已滿十八歲者,亦請勿將內容提供給未成年人士。