jiqing9006

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo
{
    public abstract class MyBase
    {

    }

    internal class MyClass : MyBase
    {

    }

    public interface IMyBaseInterface
    {

    }

    internal interface IMyBaseInterface2
    {

    }

    internal interface IMyInterface : IMyBaseInterface,IMyBaseInterface2
    {

    }

    internal sealed class MyComplexClass : MyClass,IMyInterface
    {

    }

    class Program
    {
       
        static void Main(string[] args)
        {
            MyComplexClass myObj = new MyComplexClass();
            Console.WriteLine(myObj.ToString());
            Console.ReadKey();
        }
    }
}

一个namespace可以定义多种类与接口,有意思。

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2021-04-12
猜你喜欢
  • 2022-12-23
  • 2021-10-26
  • 2021-07-07
  • 2022-12-23
  • 2022-03-03
  • 2022-12-23
  • 2021-08-28
相关资源
相似解决方案