方法について質問がありIEnumerator.GetEnumerator()
ます。
public class NodeFull
{
public enum Base : byte {A = 0, C, G, U };
private int taxID;
private List<int> children;
public int TaxID
{
get { return taxID; }
set { taxID = value; }
}
public int this[int i]
{
get { return children[i]; }
set { children[i] = value; }
}
public IEnumerator GetEnumerator()
{
return (children as IEnumerator).GetEnumerator();
}
public TaxNodeFull(int taxID)
{
this.taxID = taxID;
this.children = new List<int>(3);
}
}
コンパイルしようとすると、エラーメッセージが表示されます
'System.Collections.IEnumerator' には 'GetEnumerator' の定義が含まれておらず、タイプ 'System.Collections.IEnumerator' の最初の引数を受け入れる拡張メソッド 'GetEnumerator' が見つかりませんでした (using ディレクティブまたはアセンブリ参照がありませんか? ?)
コードに何か問題がありますか?
前もって感謝します
君たちありがとう。わかった。