G
Guest
Can someone look at the code below and tell me why if I try compiling this it
tells me there is no sort method to override? I did not paste the actual
comparer classes. It acts as if it does not see the sort method of the
ArrayList class.
Thanks in advance
Marty U.
using System;
using System.Collections;
namespace MyCustomNamespace
{
/// <summary>
/// This class inherits arraylist and stores a collection of
/// Office Sub Groups.
/// </summary>
public class OfficeSubGroupCollection : ArrayList
{
public enum SubGroupFields {
GroupID,
GroupDescription,
GroupCode
}
public override void Sort(SubGroupFields sortField, bool IsAscending) {
switch (sortField) {
case SubGroupFields.GroupDescription:
base.Sort(new DescriptionComparer());
break;
case SubGroupFields.GroupCode:
base.Sort(new CodeComparer());
break;
} //End Switch
} //End Sort Method
tells me there is no sort method to override? I did not paste the actual
comparer classes. It acts as if it does not see the sort method of the
ArrayList class.
Thanks in advance
Marty U.
using System;
using System.Collections;
namespace MyCustomNamespace
{
/// <summary>
/// This class inherits arraylist and stores a collection of
/// Office Sub Groups.
/// </summary>
public class OfficeSubGroupCollection : ArrayList
{
public enum SubGroupFields {
GroupID,
GroupDescription,
GroupCode
}
public override void Sort(SubGroupFields sortField, bool IsAscending) {
switch (sortField) {
case SubGroupFields.GroupDescription:
base.Sort(new DescriptionComparer());
break;
case SubGroupFields.GroupCode:
base.Sort(new CodeComparer());
break;
} //End Switch
} //End Sort Method