1、下列类型属于引用类型的是(C)
A:Enum B:Struct C: String D: Int
2、写出输出结果
interface IHello
{
void Hello();
}
public class BaseHello : IHello
{
#region IHello 成员
public void Hello()
{
Console.WriteLine(“BaseHello”);
}
#endregion
}
public sealed class AHello : BaseHello
{
public new void Hello()
{
Console.WriteLine(“AHello”);
}
}
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
IHello h = new AHello();
h.Hello();
BaseHello b = new BaseHello();
b.Hello();
AHello ah = new AHello();
ah.Hello();
}
}
输出为:
BaseHello
BaseHello
AHello
3、用非冒泡排序实现排序,优于冒泡效率