C# 密封类使用sealed修饰

时间:2014-10-28 23:27:57   收藏:0   阅读:331
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace @sealed
{
    class Program
    {
        static void Main(string[] args)
        {
        }
    }

   
    public  class Person
    { }

    //密封类
    /**密封类特征:
     *1、不能够被其他类继承,但是可以继承其他类
    */
    public sealed class Teacher:Person 
    { }
}

 

原文:http://www.cnblogs.com/zoro-zero/p/4058005.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!