System.Reflection.Binder.ChangeType C# (CSharp) Method

ChangeType() public abstract method

public abstract ChangeType ( object value, Type type, CultureInfo culture ) : object
value object
type Type
culture CultureInfo
return object
        public abstract object ChangeType(object value, Type type, CultureInfo culture);
        public abstract void ReorderArgumentArray(ref object[] args, object state);

Usage Example

Esempio n. 1
0
 internal static bool ConvertArgs(Binder binder, object[] args, ParameterInfo[] pinfo, CultureInfo culture)
 {
     if (args == null)
     {
         if (pinfo.Length == 0)
         {
             return(true);
         }
         else
         {
             throw new TargetParameterCountException();
         }
     }
     if (pinfo.Length != args.Length)
     {
         throw new TargetParameterCountException();
     }
     for (int i = 0; i < args.Length; ++i)
     {
         object v = binder.ChangeType(args [i], pinfo[i].ParameterType, culture);
         if ((v == null) && (args [i] != null))
         {
             return(false);
         }
         args [i] = v;
     }
     return(true);
 }
All Usage Examples Of System.Reflection.Binder::ChangeType