Question

I am using WF 4.5. I have the following working code snippet:

        Variable<Int32> varAdd1 = new Variable<Int32>();
        varAdd1.Name = "varAdd1";
        varAdd1.Default = 5;

        Assign<Int32> assignActivity1 = new Assign<int>();
        assignActivity1.To = varAdd1; // <====== HERE

The assignActivity1.To is of type OutArgument<T>. The varAdd1 is of type Variable<Int32>. I checked these 2 types' hierarchy. They don't share any common base type.

The hierarchy of these 2 types are:

OutArgument<T> -> OutArgument -> Argument

Variable<T> -> Variable -> LocationRefrence

So how could these assignment work without a type mismatch error?

Était-ce utile?
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top