title: Adding Overloaded Constructors to Implicit F# Type
body: <p>I have created the following type using implicit type construction:</p>
  
  <pre><code>open System
  
  type Matrix(sourceMatrix:double[,]) =
    let rows = sourceMatrix.GetUpperBound(0) + 1
    let cols = sourceMatrix.GetUpperBound(1) + 1
    let matrix = Array2D.zeroCreate&lt;double&gt; rows cols
    do
      for i in 0 .. rows - 1 do
      for j in 0 .. cols - 1 do
        matrix.[i,j] &lt;- sourceMatrix.[i,j]
  
    //Properties
  
    ///The number of Rows in this Matrix.
    member this.Rows = rows
  
    ///The number of Columns in this Matrix.
    member this.Cols = cols
  
    ///Indexed Property for this matrix.
    member this.Item
      with get(x, y) = matrix.[x, y]
       and set(x, y) value = 
          this.Validate(x,y)
          matrix.[x, y] &lt;- value
  
    //Methods
    /// Validate that the specified row and column are inside of the range of the matrix.
    member this.Validate(row, col) =
      if(row &gt;= this.Rows || row &lt; 0) then raise (new ArgumentOutOfRangeException("row is out of range"))
      if(col &gt;= this.Cols || col &lt; 0) then raise (new ArgumentOutOfRangeException("column is out of range"))
  </code></pre>
  
  <p>However now I need to add the following overloaded constructor to this type (which is in C# here):</p>
  
  <pre><code>public Matrix(int rows, int cols)
      {
          this.matrix = new double[rows, cols];
      }
  </code></pre>
  
  <p>The problem that I have is that it seems any overloaded constructors in an implicit type must have a parameter list that is a subset of the first constructor.  Obviously the constructor I want to add does not meet this requirement.  Is there any way to do this using implicit type construction?  Which way should I do this?  I'm pretty new to F# so if you could show the whole type with your changes in it I would greatly appreciate it.</p>
  
  <p>Thanks in advance,</p>
  
  <p>Bob</p>
  
  <p>P.S. If you have any other suggestions to make my class more in the functional style please feel free to comment on that as well.</p>