Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ChangeType()

static Variant Microsoft.Win32.OAVariantLib.ChangeType ( Variant source,
Type targetClass,
short options,
CultureInfo culture )
inlinestaticpackage

Definition at line 37 of file OAVariantLib.cs.

38 {
39 if (targetClass == null)
40 {
41 throw new ArgumentNullException("targetClass");
42 }
43 if (culture == null)
44 {
45 throw new ArgumentNullException("culture");
46 }
47 Variant result = default(Variant);
48 ChangeTypeEx(ref result, ref source, culture.LCID, targetClass.TypeHandle.Value, GetCVTypeFromClass(targetClass), options);
49 return result;
50 }
static void ChangeTypeEx(ref Variant result, ref Variant source, int lcid, IntPtr typeHandle, int cvType, short flags)
static int GetCVTypeFromClass(Type ctype)
virtual RuntimeTypeHandle TypeHandle
Definition Type.cs:286

References Microsoft.Win32.OAVariantLib.ChangeTypeEx(), System.culture, Microsoft.Win32.OAVariantLib.GetCVTypeFromClass(), System.options, System.source, System.Type.TypeHandle, and System.RuntimeTypeHandle.Value.

Referenced by System.OleAutBinder.ChangeType().