CanConvertFrom() public method

public CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
context ITypeDescriptorContext
sourceType System.Type
return bool
Exemplo n.º 1
0
		public void CanConvertFrom ()
		{
			NullableConverter converter = new NullableConverter (typeof(MyType?));
			Assert.IsTrue (converter.CanConvertFrom (null, typeof(MyType)), "#1");
			Assert.IsFalse (converter.CanConvertFrom (null, typeof(object)), "#2");
		}