2015年3月31日

C#属性和readonly类型

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication3{ class... 阅读全文

posted @ 2015-03-31 23:12 wos1239 阅读(432) 评论(0) 推荐(0) 编辑

C#传值

摘要: C#若不加限制传值时自带的类型为值传递,自创的类型为引用传递using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace... 阅读全文

posted @ 2015-03-31 22:48 wos1239 阅读(123) 评论(0) 推荐(0) 编辑

C#static

摘要: 只能用类名调用静态成员(用"类名.???")using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Console... 阅读全文

posted @ 2015-03-31 22:05 wos1239 阅读(266) 评论(0) 推荐(0) 编辑

C#this的五种用法

摘要: this的五种用法:1.使用被掩盖的成员变量:classAA{inta;publicvoidset1(inta){this.a=a;//right}publicvoidset2(inta){a=a;//会有警告:“对同一变量进行赋值;是否希望对其他变量赋值?”;}}2.把这个对象传给其他函数usin... 阅读全文

posted @ 2015-03-31 21:17 wos1239 阅读(197) 评论(0) 推荐(0) 编辑

C#class

摘要: 面向对象的三大特性: 封装、继承、多态(Encapsulation、Polymorphism、Inheritance);C#class中的五种访问权限: public 可在这个程序集(命名空间)和引用他的其他命名空间使用 private protected internal 和publ... 阅读全文

posted @ 2015-03-31 19:54 wos1239 阅读(171) 评论(0) 推荐(0) 编辑

导航