Working with C# dictionary

Check dictionary value if it's empty

dictionary.ElementAt(i).Value == DBNull.Value

Check string value

if (String.IsNullOrWhiteSpace(mystring))

equals to..

if (mystring == null || mystring == String.Empty || mystring.Trim().Length == 0)

earlier version

if (String.IsNullOrEmpty(mystring) || mystring.Trim().Length == 0)

equals to..

if (mystring== null || mystring== String.Empty)

  

上一篇:Ext2文件系统布局,文件数据块寻址,VFS虚拟文件系统


下一篇:March of the Penguins