ConvertTo() public method

public ConvertTo ( ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type ) : object
ctx ITypeDescriptorContext
ci CultureInfo
value object
type System.Type
return object
Esempio n. 1
0
		public void ConvertTo ()
		{
			TypeNameConverter cv = new TypeNameConverter ();

			Assert.AreEqual (typeof (string).AssemblyQualifiedName, cv.ConvertTo (null, null, typeof (string), typeof (string)), "A1");
		}
Esempio n. 2
0
		public void ConvertTo_NullError ()
		{
			TypeNameConverter cv = new TypeNameConverter ();

			Assert.AreEqual (null, cv.ConvertTo (null, null, null, typeof (string)), "A1");
		}
Esempio n. 3
0
		public void ConvertTo_TypeError1 ()
		{
			TypeNameConverter cv = new TypeNameConverter ();

			Assert.AreEqual ("59", cv.ConvertTo (null, null, 59, typeof (string)), "A1");
		}