Hi,
I have the following class snippet -
public class ResultsForTestC ases : IEnumerable
{
public int Length
{
get { return resultsForTestC ases.Length; }
}
IEnumerator IEnumerable.Get Enumerator() { return
resultsForTestC ases.GetEnumera tor(); }
ResultsForTestC ase[] resultsForTestC ases;
}
The problem though is if resultsForTestC ases is null, then
resultsForTestC ases.GetEnumera tor() and indeed Length will fail. How
should I handle this.
Thanks,
Barry
I have the following class snippet -
public class ResultsForTestC ases : IEnumerable
{
public int Length
{
get { return resultsForTestC ases.Length; }
}
IEnumerator IEnumerable.Get Enumerator() { return
resultsForTestC ases.GetEnumera tor(); }
ResultsForTestC ase[] resultsForTestC ases;
}
The problem though is if resultsForTestC ases is null, then
resultsForTestC ases.GetEnumera tor() and indeed Length will fail. How
should I handle this.
Thanks,
Barry
Comment