![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#学习
静候佳音123
这个作者很懒,什么都没留下…
展开
-
值类型与引用类型
C#中的数据类型: 值类型:int ,char ,double ,bool...... 引用类型:类(string) ,数组 ,接口 值类型变量存储对象的值,赋值会创建值的副本,修改任何一个副本,不会影响其他的副本。 例如:int x=5; int y=x; y--; 运算结果:x=5 y=4 引用类型变量存储对象的内存地址,赋值不会原创 2016-09-05 09:48:19 · 108 阅读 · 0 评论 -
属性的封装和方法的使用
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Function2 { class Child { //使用属性封装字段 private string _name; private string _sex="男"; pri原创 2016-09-05 10:03:58 · 919 阅读 · 0 评论