C#字符串比较

正确写法1
  bool bTemplatecontent2 = strtemplateContentInDB.Equals(strTemplateContentInDesignPanel, StringComparison.Ordinal);

 bTemplatecontent2 = true;
正确写法2
bool bEqual = String.Equals(strtemplateContentInDB, strTemplateContentInDesignPanel, StringComparison.Ordinal);
bEqual = true;

 

posted @ 2014-01-23 20:41  quietwalk  阅读(1101)  评论(0编辑  收藏  举报