(C# 新手)我正在 C# 中创建一个锯齿状数组表单,如下所示,然后将其传递给表单 2:
// Answers jagged array that is declared in form 1
private Question[][] _answers;
以下代码是我用来创建第二种形式并将数组传递给它的代码:
//Code to pass all elements of array to new array in form 2
Question[][] DisplayAnswers = new Question[1][];
//Code for new form2
ResultsForm resultsForm = new ResultsForm();
//Code for dialog results from form 2
DialogResult dialogResult = resultsForm.ShowDialog();
我是否正确传递了数组?