2009-11-27 164 views

回答

1

Probably not in the way you're thinking of doing it.

如果你不關心你替換了原始的字符串源,你可以遍歷每個DataRow中,並更新每個項目的列值來代替。

foreach(var row in yourDataTable.Rows) 
{ 
    row["colName"] = row["colName"].ToString().Replace("abc", "xyz"); 
}