[Mono-list] typeof(string)

Dan Lewis dihlewis@yahoo.co.uk
Fri, 15 Mar 2002 16:33:14 +0000 (GMT)

 --- Gaurav Vaish <gvaish@iitk.ac.in> wrote:
> Hello,
>     I have a method with following definition:
>         public override object ConvertTo(ITypeDescriptorContext context,
> CultureInfo culture, object value, Type destinationType)

Shouldn't it be:

  if (destinationType == typeof (string)) { ... }

typeof returns an object of class Type, which what you're checking equality


Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts