ConvertTo() публичный Метод

public ConvertTo ( ITypeDescriptorContext ctx, CultureInfo ci, object value, Type type ) : object
ctx ITypeDescriptorContext
ci CultureInfo
value object
type System.Type
Результат object
Пример #1
0
		public void ConvertTo ()
		{
			TypeNameConverter cv = new TypeNameConverter ();

			Assert.AreEqual (typeof (string).AssemblyQualifiedName, cv.ConvertTo (null, null, typeof (string), typeof (string)), "A1");
		}
Пример #2
0
		public void ConvertTo_NullError ()
		{
			TypeNameConverter cv = new TypeNameConverter ();

			Assert.AreEqual (null, cv.ConvertTo (null, null, null, typeof (string)), "A1");
		}
Пример #3
0
		public void ConvertTo_TypeError1 ()
		{
			TypeNameConverter cv = new TypeNameConverter ();

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