封装、继承、多态、接口、枚举、委托、多线程、集合、事件、都明白了?
来源:互联网 发布:上海巨人网络 编辑:程序博客网 时间:2024/06/01 16:21
封装、接口、继承、多态、枚举、委托、多线程、集合、事件、都明白了?
并没有明白,还需要加深记忆,仅作记忆。源自msdnApi库,现整理合并以便查询。
封装前:
<span style="font-family:Microsoft YaHei;font-size:14px;">using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;class Square{ // 选择width字段,然后封装看下 public int width, height;}class MainClass{ public static void Main() { Square mySquare = new Square(); mySquare.width = 110; mySquare.height = 150; // 宽和高的输出值 Console.WriteLine("width = {0}", mySquare.width); Console.WriteLine("height = {0}", mySquare.height); }}</span>
封装后:(选择width字段 Ctrl R+E 应用并确定)
<span style="font-family:Microsoft YaHei;font-size:14px;">using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;class Square{ // 选择width字段,然后封装看下 public int width, height; public int Width { get { return width; } set { width = value; } }}class MainClass{ public static void Main() { Square mySquare = new Square(); mySquare.Width = 110; mySquare.height = 150; // 宽和高的输出值 Console.WriteLine("width = {0}", mySquare.Width); Console.WriteLine("height = {0}", mySquare.height); }}</span>
接口:
0 0
- 封装、继承、多态、接口、枚举、委托、多线程、集合、事件、都明白了?
- 接口、继承、委托、事件
- 关于继承、多态、委托、事件和接口的理解
- 封装,继承,多态,接口
- 封装,继承,多态,接口
- 封装、多态、抽象、继承、接口
- 封装,多态,接口,集合,迭代器
- oc 封装/继承/多态-一看就明白
- 「基础」C#中的继承,重载,委托,你真的弄明白了吗?
- C# 中的委托和事件 分类: .NET 接口+泛型+委托+继承
- 接口&委托&事件
- 接口,事件与委托
- 面试常考 类 对象 接口 继承 多态 异常 多线程 集合框架 泛型 IO流
- JDK7集合、多线程类及接口继承关系图
- 构造,封装,继承,多态,重载,重写,接口
- 抽象 多态 继承 封装 接口 单例
- 继承、多态、封装、抽象类与接口
- 封装 ,继承, 多态,抽象类 ,接口
- servlet涉及对象(补充)
- 单例模式解析
- Ad-Hoc(点对点)模式
- JS中 原型模式与构造模式
- ++i 与i++哪个效率更高?
- 封装、继承、多态、接口、枚举、委托、多线程、集合、事件、都明白了?
- MsgWaitForMultipleObjects
- base关键字
- 数据库连接池配置
- Canvas练习之绘制网格
- LA 4731 蜂窝网络(简单dp+贪心)
- C++编程入门系列之四(数据类型)
- Visual FoxPro正式版
- JAVA利用POI解析Excel图片,并按照标签号分类导入文件夹