Do you mean Type?
On 30 April 2010 11:45, Arjang Assadi arjang.ass...@gmail.com wrote:
I need to have method with a a signature looking like this
RegisterForm( typeof(Form) formType)
where the forn type is actually a class refrence ( Delphi parlance,
what are class refrences are called in
Use System.Type http://msdn.microsoft.com/en-us/library/system.type.aspx:-)
On Fri, Apr 30, 2010 at 9:45 AM, Arjang Assadi arjang.ass...@gmail.comwrote:
I need to have method with a a signature looking like this
RegisterForm( typeof(Form) formType)
where the forn type is actually a class
if you need to limit the range of types passed in I tend to use generics
with a constraint and typeof()
i.e.
void RegisterFormT() where T : Form
{
var type = typeof(T);
// ...
}
It also really depends on what you are using the type for I guess.
On Fri, Apr 30, 2010 at 7:45 AM, Arjang
Thank you Preet and Joseph,
I was trying to avoid using Type, I wanted to see if there is
something closer to FormType rather than the generic Type. Same way
that that people would avoid using object and instead use some type
of constraint as is used in genereics.
On 30 April 2010 09:48, Joseph