-
Notifications
You must be signed in to change notification settings - Fork 44
LateType
Ed Askew edited this page Apr 27, 2020
·
2 revisions
dynamic bigIntType = new DynamicObjects.LateType("System.Numerics.BigInteger, System.Numerics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
if (tBigIntType.IsAvailable)
{
var one = bigIntType.@new(1);
var two = bigIntType.@new(2);
Assert.IsFalse(one.IsEven);
Assert.AreEqual(true, two.IsEven);
var tParsed = bigIntType.Parse("4");
Assert.AreEqual(true, tParsed.IsEven);
}
private static readonly dynamic LateConvert = new DynamicObjects.LateType(typeof(Convert));
public static bool IsDBNull(object value)
{
try
{
return LateConvert.IsDBNull(value);
}
catch
{
return false;
}
}