2009-11-27 166 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"); 
}