title: How can I use Convert.ChangeType instead of DateTime.ParseExact?
body: <p>I'm writing a parser class which parses a <code>string</code> to a <code>type</code> with customized format.</p>
  
  <p>For example I want to use <code>Parse&lt;DateTime&gt;("20161018",typeof(DateTime),UnknownFormatProvider)</code> and It returns the parsed <code>DateTime</code>;</p>
  
  <p>I know I can use <code>DateTime.ParseExact</code> for converting <code>string</code> with specific format to <code>DateTime</code> but for the mentioned reason I must use <code>Convert.ChangeType(object,Type,IFormatProvider)</code>.</p>
  
  <p>Is there any way to create an <code>IFormatProvider</code> to use in <code>Convert.ChangeType(object,Type,IFormatProvider)</code> to do make it work just like <code>DateTime.ParseExact</code>?</p>
  
  <blockquote>
    <p>Edit: Maybe <code>System.Globalization.DateTimeFormatInfo</code> should work, but I
    still don't know how to set it to work like <code>DateTime.ParseExact</code></p>
  </blockquote>