title: Dealing with overloaded functions that have ambiguous parameters
body: <p>Take this small example class (not my real code, but it exposes the problem):</p>
  
  <pre><code>Convert = class(TObject)
    public
      class function ToString(value: Double): String; overload;
      class function ToString(value: TDateTime): String; overload;
    end;
  </code></pre>
  
  <p>It compiles fine until you try to use the <code>Double</code> or <code>TDateTime</code> functions As
  In:</p>
  
  <pre><code>var
    d: Double;
  begin
    d := 99.99;
    ShowMessage(Convert.ToString(d));
  </code></pre>
  
  <p>You will get this compile error: Ambiguous overloaded call to 'ToString'.
  The problem boils down to the fact that <code>TDateTime</code> is a type of <code>Double</code></p>
  
  <p>My Question: how do You deal with this type of problem?</p>
  
  <p><strong>EDIT - I am NOT looking for a solution for the example given</strong></p>
  
  <p>I have found 3 Solutions so far:</p>
  
  <ul>
  <li>Rename one of the 2 functions</li>
  <li>Add a "Dummy" parameter to one of the 2 functions</li>
  <li>Change the parameters to Var types, this has the disadvantage that I can no longer call this function with constants</li>
  </ul>
  
  <p>are there any other solutions out there?</p>