Michael Minutillo's answer is exactly what you want. -----Original Message----- From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Arjang Assadi Sent: Friday, 30 April 2010 8:06 AM To: ozDotNet Subject: Re: How to declare a class refrence as an argument type?
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 Clark <jcl...@atlassian.com> wrote: > Use System.Type :-) > > > On Fri, Apr 30, 2010 at 9:45 AM, 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 C#?). >> >> so I would be able to call it like this : >> >> RegiterForm( typeOf(Form1) ); >> >> Any further references sugeestions links? >> >> Thank you >> >> Regards >> >> if [OT] is short for [Off Topic], what is the short for [On Topic] ? :) > > This email is intended for the named recipient only. The information it contains may be confidential or commercially sensitive. If you are not the intended recipient you must not reproduce or distribute any part of this email, disclose its contents to any other party, or take any action in reliance on it. If you have received this email in error, please contact the sender immediately and delete the message from your computer.