Microsoft.CSharp.RuntimeBinder.RuntimeBinder.BindExplicitConversion C# (CSharp) Method

BindExplicitConversion() private method

private BindExplicitConversion ( ArgumentObject arguments, Type returnType, LocalVariableSymbol>.Dictionary dictionary ) : EXPR
arguments ArgumentObject
returnType System.Type
dictionary LocalVariableSymbol>.Dictionary
return Microsoft.CSharp.RuntimeBinder.Semantics.EXPR
        private EXPR BindExplicitConversion(ArgumentObject[] arguments, Type returnType, Dictionary<int, LocalVariableSymbol> dictionary)
        {
            if (arguments.Length != 1)
            {
                throw Error.BindExplicitConversionRequireOneArgument();
            }

            // Load the conversions on the target.
            _symbolTable.AddConversionsForType(returnType);

            EXPR argument = CreateArgumentEXPR(arguments[0], dictionary[0]);
            CType destinationType = _symbolTable.GetCTypeFromType(returnType);

            return _binder.mustCast(argument, destinationType);
        }