zoukankan      html  css  js  c++  java
  • C# 语法四 修饰符

    1.sealed 不能派生

    2.internal 仅仅在本项目中被访问

    3.public 整个系统

    4.private 本类访问

    5.protected 本类、派生类访问

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    
    namespace ClassLibrary1
    {
        public class Class3
        {
            private int _age;
            protected string Name;
            public string Tel;
        }
    
    
        internal class Class33
        {
            private int _age;
            protected string Name;
            public string Tel;
        }
    
    
        sealed class Class333
        {
            private int _age;
            protected string Name;
            public string Tel;
        }
    
    
        abstract class Class3333
        {
            private int _age;
            protected string Name;
            public string Tel;
        }
    
    
        static class Class33333
        {
            private int _age;
            protected string Name;
            public string Tel;
        }
    }
    天生我材必有用,千金散尽还复来
  • 相关阅读:
    python安装
    实现node服务器
    VSCode集成tomcat及使用方法
    CommonJS规范
    Bootstrap 笔记
    vue笔记
    jgGrid模板添加
    vue组件中的data
    解析DNS
    StaticResource
  • 原文地址:https://www.cnblogs.com/ligenyun/p/7840728.html
Copyright © 2011-2022 走看看