有点头晕~http://www.csdn.net/develop/Read_Article.asp?id=25354

解决方案 »

  1.   

    using System;namespace CSDN
    {
    public interface I1
    {
    void Test();
    } public interface I2
    {
    void Test();
    } public class BaseClass : I1, I2
    {
    public void TheTest()
    {
    this._Greeting();
    } void I1.Test()
    {
    this.TheTest();
    }

    public void AnotherTest()
    {
    this.Greeting();
    }

    void I2.Test()
    {
    this.AnotherTest();
    } private void _Greeting()
    {
    i += 1;
    Console.WriteLine("Hello, Base. For the " + i + "th time(s)");
    } static int i = 0;
    protected virtual void Greeting()
    {
    this._Greeting();
    }
    } public class SubClass : BaseClass
    {
    static int j = 0;
    protected  override void Greeting()
    {
    j += 1;
    Console.WriteLine("Hello, Sub. For the " + j + "th time(s)");
    }
    }

    /// <summary>
    /// Summary description for TestMain.
    /// </summary>
    class TestMain
    {
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main(string[] args)
    {
    I1 o1;
    I2 o2;
    BaseClass o3;
    SubClass o4 = new SubClass(); o1 = o4;
    o2 = o4;
    o3 = o4; o1.Test();
    o2.Test();
    o3.TheTest();
    o3.AnotherTest();
    }
    }
    }
      

  2.   

    还不错。
    怎么只有一个人翻?上次我做掉查“VB.NET什么地方不如C#”的时候,每个人都说C#强大,都说没有VB.NET能写出而C#不能写出的程序,怎么现在都不动了呢?