예제 #1
0
 /// <summary>
 /// Converts the specified input to the given output.
 /// </summary>
 /// <typeparam name="TInput">The type of the input.</typeparam>
 /// <typeparam name="TOutput">The type of the output.</typeparam>
 /// <param name="input">The input object of TInput.</param>
 /// <returns>A resulting TOutput.</returns>
 public TOutput Convert <TInput, TOutput>(TInput input)
 {
     //throw new FormatException(
     //	string.Format(
     //		"Cannot convert '{0}' from {1} to {2}.",
     //		input,
     //		typeof (TInput),
     //		typeof (TOutput)));
     return((TOutput)SystemConvert.ChangeType(input, typeof(TOutput)));
 }