我很好奇使用if(some_value is DBNull)与if(DBNull.Value.Equals(some_value))的利弊是什么。就我个人而言,我更喜欢if(some_value is DBNull),因为我发现它更具可读性。据if(DBNull.Value.Equals(some_value))介绍,我知道微软推荐使用。
something else }The value for column 'FruitGarden' in table 'GetFruitCrate' is DBNullSystem.Data.StrongTypingException: The value for column 'FruitGarden' in table 'GetFruitCrate' is DBNull---> System.Inval