From 44dabe7d39530e771855d8680c78fb1a616eb6b0 Mon Sep 17 00:00:00 2001 From: Mike Burns Date: Wed, 2 Mar 2016 15:30:55 +1000 Subject: [PATCH] Non-generic call to As() Ability to call As with a type object rather than a generic or no type. --- AFrame.Core/Context.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/AFrame.Core/Context.cs b/AFrame.Core/Context.cs index f66b79c..6d2488b 100644 --- a/AFrame.Core/Context.cs +++ b/AFrame.Core/Context.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -19,5 +19,10 @@ public Control As() { return As(); } + + public Control As(Type type) + { + return (Control)Control.CreateInstance(type, this, null); + } } -} \ No newline at end of file +}