private void twoDeterminant_Click(object sender, EventArgs e)
        {
            Matrix matrix = new Matrix(twoDataGridView.Rows.Count, twoDataGridView.Columns.Count);

            for (int i = 0; i < twoDataGridView.Rows.Count; i++)
            {
                for (int j = 0; j < twoDataGridView.Columns.Count; j++)
                {
                    if (twoDataGridView.Rows[i].Cells[j].Value == null)
                    {
                        matrix[i, j] = 0;
                    }
                    else
                    {
                        matrix[i, j] = double.Parse(twoDataGridView.Rows[i].Cells[j].Value.ToString());
                    }
                }
            }
            MessageBox.Show(FuncMatrix.Determinant(matrix).ToString());
        }
 private void resultDeterminant_Click(object sender, EventArgs e)
 {
     MessageBox.Show(FuncMatrix.Determinant(matrix).ToString());
 }