From 2341e081795ad5d20a98eca56effabb5acb24854 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Sat, 26 Sep 2020 08:41:03 -0700 Subject: [PATCH] Added IsValueType --- BeefLibs/corlib/src/Variant.bf | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/BeefLibs/corlib/src/Variant.bf b/BeefLibs/corlib/src/Variant.bf index e397c804..06198b54 100644 --- a/BeefLibs/corlib/src/Variant.bf +++ b/BeefLibs/corlib/src/Variant.bf @@ -43,6 +43,18 @@ namespace System } } + public bool IsValueType + { + get + { + if (mStructType <= 2) + return false; + if ((mStructType & 3) == (int)StructFlag.ExternalPtr) + return VariantType.IsValueType; + return mStructType != 0; + } + } + public Type VariantType { get