Mono.CSharp.DelegateCreation.ImplicitStandardConversionExists C# (CSharp) Method

ImplicitStandardConversionExists() public static method

public static ImplicitStandardConversionExists ( ResolveContext ec, Mono.CSharp.MethodGroupExpr mg, System.TypeSpec target_type ) : bool
ec ResolveContext
mg Mono.CSharp.MethodGroupExpr
target_type System.TypeSpec
return bool
		public static bool ImplicitStandardConversionExists (ResolveContext ec, MethodGroupExpr mg, TypeSpec target_type)
		{
			if (target_type == TypeManager.delegate_type || target_type == TypeManager.multicast_delegate_type)
				return false;

			var invoke = Delegate.GetInvokeMethod (ec.Compiler, target_type);

			Arguments arguments = CreateDelegateMethodArguments (invoke.Parameters, invoke.Parameters.Types, mg.Location);
			return mg.OverloadResolve (ec, ref arguments, null, OverloadResolver.Restrictions.CovariantDelegate | OverloadResolver.Restrictions.ProbingOnly) != null;
		}