title: C# Cannot convert from 'System.DateTime' to 'object[]' methodinfo.invoke
body: <p>Look I maybe approaching this the wrong way and direction is more than welcome.</p>
  
  <p>I'm trying to trigger all the <code>Start</code> methods in my solution.</p>
  
  <p>The Start method takes a datetime</p>
  
  <p>However when trying to pass the date as a parameter of "Invoke" I run into the error </p>
  
  <blockquote>
    <p>cannot convert from System.DateTime to object[]</p>
  </blockquote>
  
  <p>Any thoughts welcome </p>
  
  <p>Thanks gws</p>
  
  <pre><code>scheduleDate = new DateTime(2010, 03, 11);
  
  Type[] typelist = GetTypesInNamespace(Assembly.GetExecutingAssembly(), "AssetConsultants");
  
  foreach (Type t in typelist)
  {
      var methodInfo = t.GetMethod("Start", new Type[] {typeof(DateTime)} );
      if (methodInfo == null) // the method doesn't exist
      {
         // throw some exception
      }
  
      var o = Activator.CreateInstance(t);                 
      methodInfo.Invoke(o, scheduleDate);
  }
  </code></pre>