クラスは、この構造を処理するための正しい方法である必要があり、C#で簡単な実装は次のようになります。
using System.Collections.Generic;
namespace DataStructure
{
class Program
{
static void Main(string[] args)
{
// Creating Data Set
var AllDataSet = new List<DataStructure>();
AllDataSet.Add(
new DataStructure(new char[] { 'A', 'T', 'G' }, new string[] { "Fever", "Cough" }, 24)
);
AllDataSet.Add(
new DataStructure(new char[] { 'T', 'C', 'G' }, new string[] { "High Blood Pressure" }, 56)
);
AllDataSet.Add(
new DataStructure(new char[] { 'A', 'T', 'G' }, new string[] { "Diabetes", "High Blood Pressure" }, 79)
);
}
}
public class DataStructure
{
public char[] DNAChar;
public string[] SetValuedData;
public int Age;
public DataStructure(char[] dnaChar, string[] setValuedData, int age)
{
DNAChar = dnaChar;
SetValuedData = setValuedData;
Age = age;
}
// Add other logic here
}
}
次に、あなたのロジックを実装するための機能を追加することができます。希望、これは助ける!