public interface IActivity
public abstract class BaseActivity:IActivity
public class MyActivity:BaseActivity //I don't really call stuff MyXxx
Type type = validIActivityTypes.Single(); //I've already performed my checks for this ConstructorInfo constructor = type.GetConstructor(Type.EmptyTypes); if (constructor == null) return result; IActivity activity = (IActivity)constructor.Invoke(null);
Quote:A first chance exception of type 'System.InvalidCastException' occurred in ServerControls.dll Additional information: Unable to cast object of type 'WorkFlowEngine.Activities.MyActivity' to type 'WorkFlowEngine.Interfaces.IActivity'.
type.GetInterfaces()
>type.GetInterfaces() | {System.Type[1]} >[0] | {Name = "IActivity" FullName = "WorkFlowEngine.Interfaces.IActivity"}
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)