-3
有没有人知道,为什么这个下划线(错误)在说“股票是西装”的部分套装(儿童类股票)?C#父类和子类 - 从父类中挑选孩子
//Picking Suit out of the Stock
public System.Collections.ArrayList Suit()
{
System.Collections.ArrayList array = new System.Collections.ArrayList(); //looping through Persons array
foreach (Stock stock in allStock)//using code snippets
{
if (stock is Suit) //if it is a customer, display value, if not, return to the array list
{
array.Add(stock);
}
}
return array;
}
什么是错误它显示? – Shaharyar
你为什么使用'ArrayList'?这是2002年。现在有更好的收藏 - 尝试'列表'。 –
Enigmativity