Guid 使用记录; Guid 数据不能设为null 用 00000000-0000-0000-0000-000000000000 代替默认值。
实体新建时,可以赋值为 Guid.Empty 也就是 00000000-0000-0000-0000-000000000000
Guid gi = Guid.Empty; Response.Write("-----------<br/>"); Response.Write(gi.ToString()); //输出为 00000000-0000-0000-0000-000000000000 Response.Write("-----------<br/>"); Guid gi1 = Guid.Parse("00000000-0000-0000-0000-000000000000"); if (gi==gi1) { Response.Write("-----gi==gi1------<br/>"); } if (gi1 == Guid.Empty) { Response.Write("-----gi1==Guid.Empty------<br/>"); } Response.Write("Guid.Empty:<br/>"+Guid.Empty.ToString()); Response.Write("Guid us = null;错误的复制方法!" + Guid.Empty.ToString());