C#学习笔记
sgclzqq
这个作者很懒,什么都没留下…
展开
-
C#学习笔记--get/set访问器
C#学习笔记–get/set访问器属性成员提供了get/set访问器来灵活方便的读取、编写某个私有字段的值,同时也保证了方法的安全性和灵活性。写了个小例子加深理解。using System;namespace Class{ public class Student { private String name; private int age;原创 2016-07-30 11:49:36 · 853 阅读 · 0 评论 -
C#学习笔记--两个数据的交换
//异或实现交换数据。相同为0,不同为1,通过异或运算能够是数据中的某些位翻转,其中一个数与任意一个给定的值连续异或两次,值不变 //第一种方法 int s; x = x ^ y; y = x ^ y; x = x ^ y; //s = x - y;原创 2016-07-30 13:55:59 · 400 阅读 · 0 评论 -
C#学习笔记--递归算法
递归,将函数的结果作为函数的参数,继续调用自身。using System;namespace DiGui{ class Program { static void Main(string[] args) { Program pg = new Program(); int s = Dg(30);原创 2016-07-30 18:46:45 · 232 阅读 · 0 评论 -
C#学习笔记--ArrayList?List<T>?Dictionary
using System;using System.Collections.Generic;using System.Collections;namespace ShuJu{ class Program { static void Main(string[] args) { ArrayList list = new Ar原创 2016-08-01 16:33:53 · 228 阅读 · 0 评论