问一个关于C#访问性高低的问题哈
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
ArrayList a1 = new ArrayList();
a1.Add("b");
a1.Add("a");
a1.Add("c");
a1.Add("B");
a1.Add("A");
a1.Add("C");
a1.Sort();
for (int i = 0; i < a1.Count; i++)
Console.WriteLine(a1[i]);
a1.Sort(new myComparer1());
Console.WriteLine("--------");
for (int i = 0; i < a1.Count; i++)
Console.WriteLine(a1[i]);
}
}
public class
myComparer1 : TComparer
{
int TComparer.Comparer(Object x, Object y)
{
return ((new CaseInsensitiveComparer()).Compare(y.x));
}
}
}
他说我Tcomparer的访问性比myComparer1()的访问性这是咋回事啊?请高手赐教小菜