/// <summary> /// Can return null!!! /// </summary> /// <returns></returns> public Apple GetApple() { Apple example = new Apple(null); GroupObj[] wObjects = Objects.ToArray(); foreach (GroupObj checkObj in wObjects) { if (checkObj.GetType() == example.GetType()) { return((Apple)checkObj); } } return(null); }