正确写法1 bool bTemplatecontent2 = strtemplateContentInDB.Equals(strTemplateContentInDesignPanel, StringComparison.Ordinal); bTemplatecontent2 = true; 正确写法2 bool bEqual = String.Equals(strtemplateContentInDB, strTemplateContentInDesignPanel, StringComparison.Ordinal); bEqual = true;
原文:http://www.cnblogs.com/quietwalk/p/3531726.html