Dynamic Type Casting

I could use some help on this one. Is it possible to dynamically type cast something? Here is what I am doing:

GameObject holder;
holder = (string.IsNullOrEmpty(action.tagOfHolder) == false) ? GameObject.FindGameObjectWithTag (action.tagOfHolder) : GameObject.Find(action.nameOfHolder);

if (holder.GetComponent (action.playerComponentScript) != null) {
	Type mytype = Type.GetType (holder.GetComponent (action.playerComponentScript));
	mytype script = holder.GetComponent (action.playerComponentScript);

I keep getting this error:

The type or namespace name `mytype’ could not be found. Are you missing a using directive or an assembly reference?

I don’t know the types of the component since this is decided based on what I am trying to find.
I want to dynamically type cast this so I can enable/disable the component. I can’t just do:

holder.GetComponent (action.playerComponentScript).enabled = true;

because it needs to know what type it is(Example):

holder.GetComponent ("Animation" as Animation).enabled = true;

Anyone have any direction for me?

NOTE: Other variations I have tried…

(holder.GetComponent (action.playerComponentScript) as myType).enabled = true;

(mytype)holder.GetComponent (action.playerComponentScript).enabled = true;

does it work till Line 5? if so use that

public static void SetEnabledTo(System.Object targetObj,bool isEnable)
{
        if (targetObj == null)
            return;
        
        Type aType = targetObj.GetType();
        if (aType.GetProperty("enabled") != null)
        {
            System.Reflection.PropertyInfo rpi = aType.GetProperty("enabled");
            rpi.SetValue(targetObj, isEnable, null);
        }
}

Note:According to c# docs ProperyInfo.SetValue has an overload Set(Object,Object) but for some reason it won’t show it on VS

or change the mytype on line 6 to var but you ll still won’t know if enabled propery exist