MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / IsInstanceOfType

Method IsInstanceOfType

Source/Editor/Scripting/ScriptType.cs:1069–1069  ·  view source on GitHub ↗

Determines whether the specified object is an instance of the current type. The object to compare with the current type. if the current is in the inheritance hierarchy of the object represented by , or if the current type is an interface that implements

(object o)

Source from the content-addressed store, hash-verified

1067 /// <returns>
1068 /// <see langword="true" /> if the current <see langword="Type" /> is in the inheritance hierarchy of the object represented by <paramref name="o" />, or if the current type is an interface that <paramref name="o" /> implements. <see langword="false" /> if neither of these conditions is the case, if <paramref name="o" /> is <see langword="null" />, or if the current <see langword="Type" /> is an open generic type.</returns>
1069 public bool IsInstanceOfType(object o) => o != null && IsAssignableFrom(new ScriptType(o.GetType()));
1070
1071 /// <summary>
1072 /// Determines whether an instance of a specified type can be assigned to an instance of the current type.

Callers 2

GetClipboardValueMethod · 0.45
GetClipboardObjectMethod · 0.45

Calls 2

IsAssignableFromFunction · 0.85
GetTypeMethod · 0.45

Tested by

no test coverage detected