Ejemplo n.º 1
0
 internal ClrPrimitive(ClrType type, object value)
 {
     if (ReferenceEquals(value, null))
     {
         throw new ArgumentNullException(nameof(value));
     }
     Type = type;
     if (type.CanBeAssignedTo <IntPtr>())
     {
         Value = PointerUtils.CastLongToIntPtr((long)value);
     }
     else
     {
         Value = value;
     }
 }