そのため、Linq を使用して XML ドキュメント (学生の名前と ID を含む) を xml にロードしている C# プロジェクトがあり、WCF サービスから関連データ (期日、金額など) を取得する必要があります。右クリックしてサービス参照を追加するだけでサービスを追加し、配列を GetData 関数に渡す必要があります。これは初期化しましたが、明らかに null です。配列をサービス型に変換できず、関数も配列を返します。配列を studentArray に割り当てるにはどうすればよいですか?
ServiceReference1.ServiceClient client = new ServiceReference1.RycorServiceClient();
Application.ServiceReference1.Student[] studentArray = new ServiceReference1.Student[9];
Student[] array = studentList.ToArray();
//for (int i = 0; i <= array.Count(); i++)
// studentArray[i] = (RycorApplication.ServiceReference1.Student)array[i];
//this gives me an error says Cannot convert type 'Application.Student' to 'Application.ServiceReference1.Student'.
var data = client.GetData(studentArray);
このデータを取得した後、このデータを XML ファイルに保存するにはどうすればよいですか?