I am creating my own Matrix4x4 struct but the problem that I have is, if I don't give it any values for the parameter when I create a `new Mat4x4()`, then it will be null rather then setting it to the default parameters, when looking at it in debug mode it temporarily sets the values in the constructor but then goes back to null.

Struct code:

```
public readonly struct Mat4x4
{
    public static Mat4x4 Identity { get; } = new Mat4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);

    private readonly double[] matrix;

    public Mat4x4(double m00 = 1, double m01 = 0, double m02 = 0, double m03 = 0, double m10 = 0, double m11 = 1, double m12 = 0, double m13 = 0, double m20 = 0, double m21 = 0, double m22 = 1, double m23 = 0, double m30 = 0, double m31 = 0, double m32 = 0, double m33 = 1)
    {
        matrix = new double[] { m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33 };
    }

    public double this[int row, int column]
    {
        get
        {
            return (matrix[row * 4 + column]);
        }
    }

    public override string ToString()
    {
        string str = $"[ {matrix[0]} , {matrix[1]} , {matrix[2]} , {matrix[3]} ]\n" +
                     $"[ {matrix[4]} , {matrix[5]} , {matrix[6]} , {matrix[7]} ]\n" +
                     $"[ {matrix[8]} , {matrix[9]} , {matrix[10]} , {matrix[11]} ]\n" +
                     $"[ {matrix[12]} , {matrix[13]} , {matrix[14]} , {matrix[15]} ]";
        return str;
    }
}

```

This will will throw an error because `matrix = null`:

```
Mat4x4 testMatrix = new Mat4x4();
Debug.Log(testMatrix.ToString());

```

But this will work, and set the matrix to correct default values:

```
Mat4x4 testMatrix = new Mat4x4(m00:1);
Debug.Log(testMatrix.ToString());

```

The way I want it to work is that If I don't give it any parameters it should set the values to the same as `Identity`, also I want to have the option to only set selected values like `new Mat4x4(m02:2,m13:5)` and still have the rest set to `Identity`

**EDIT:**

Skipping the use of `double[]`

```
public readonly struct Mat4x4
{
    public static Mat4x4 Identity { get; } = new Mat4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);

    public double M00 { get; }
    public double M01 { get; }
    public double M02 { get; }
    public double M03 { get; }
    public double M10 { get; }
    public double M11 { get; }
    public double M12 { get; }
    public double M13 { get; }
    public double M20 { get; }
    public double M21 { get; }
    public double M22 { get; }
    public double M23 { get; }
    public double M30 { get; }
    public double M31 { get; }
    public double M32 { get; }
    public double M33 { get; }

    public Mat4x4(double m00 = 0, double m01 = 0, double m02 = 0, double m03 = 0, double m10 = 0, double m11 = 0, double m12 = 0, double m13 = 0, double m20 = 0, double m21 = 0, double m22 = 0, double m23 = 0, double m30 = 0, double m31 = 0, double m32 = 0, double m33 = 0)
    {
        M00 = m00; M01 = m01; M02 = m02; M03 = m03;
        M10 = m10; M11 = m11; M12 = m12; M13 = m13;
        M20 = m20; M21 = m21; M22 = m22; M23 = m23;
        M30 = m30; M31 = m31; M32 = m32; M33 = m33;
    }

    public double this[int row, int column]
    {
        get
        {
            return this[row * 4 + column];
        }
    }

    public double this[int index]
    {
        get
        {
            switch (index)
            {
                case 0: return M00;
                case 1: return M01;
                case 2: return M02;
                case 3: return M03;
                case 4: return M10;
                case 5: return M11;
                case 6: return M12;
                case 7: return M13;
                case 8: return M20;
                case 9: return M21;
                case 10: return M22;
                case 11: return M23;
                case 12: return M30;
                case 13: return M31;
                case 14: return M32;
                case 15: return M33;
                default: return M00;
            }
        }
    }

    public override string ToString() =>
        $"[ {M00} , {M01} , {M02} , {M03} ]\n" +
        $"[ {M10} , {M11} , {M12} , {M13} ]\n" +
        $"[ {M20} , {M21} , {M22} , {M23} ]\n" +
        $"[ {M30} , {M31} , {M32} , {M33} ]";
}

```

`var myMat = new Mat4x4()` will default as 0,0,0,0... and for identity matrix `var myMat = Mat4x4.Identity`