public static bool TryTypeAssert(this go.main_package.V target, Type type, out object result) { try { result = target.TypeAssert(type); return(true); } catch (PanicException) { result = type.IsValueType ? Activator.CreateInstance(type) : null; return(false); } }
public static bool TryTypeAssert <T>(this go.main_package.V target, out T result) { try { result = target.TypeAssert <T>(); return(true); } catch (PanicException) { result = default(T); return(false); } }