任意字符串(包括空串)都包含空白字符串

string a="";

string b="";

string c=null;

a.Contains(b) 为true;  a.Contains(b??"xx")任为true,因为b??"xx"仍="".  a.Contains(c??"")为true

为null的字符串不能出现在Contain的两边,即:c.Contain(a) 或 a.Contains(c)都会报错。

原文地址:https://www.cnblogs.com/mol1995/p/11356021.html