摘要: System.SerializableAttribute串行化是指存储和获取磁盘文件、内存或其他地方中的对象。在串行化时,所有的实例数据都保存到存储介质上,在取消串行化时,对象会被还原,且不能与其原实例区别开来。只需给类添加Serializable属性,就可以实现串行化实例的成员。并行化是串行化的逆过程,数据从存储介质中读取出来,并赋给类的实例变量。例:1[Serializable]2publicclassPerson3{4publicPerson()5{6}78publicintAge;9publicintWeightInPounds;10} 下面来看一个小例子,首先要添加命名空间using 阅读全文
posted @ 2012-11-21 20:05 尼姑哪里跑 阅读(199) 评论(0) 推荐(0) 编辑
摘要: View Code using System;using System.Collections.Generic;using System.Text;using System.Collections;using System.Text.RegularExpressions;using System.IO;namespace 栈和队列{ class Program { static void Main(string[] args) { } #region 栈 // 栈和队列是两种面向表的数据结构 // ... 阅读全文
posted @ 2012-11-21 14:23 尼姑哪里跑 阅读(175) 评论(0) 推荐(0) 编辑
摘要: View Code using System;using System.Collections.Generic;using System.Text;namespace 基本查找算法{ class Program { static void Main(string[] args) { } #region 顺序查找 /// <summary> /// 顺序查找 /// </summary> /// <param name="arr"></param> /// <... 阅读全文
posted @ 2012-11-21 10:12 尼姑哪里跑 阅读(118) 评论(0) 推荐(0) 编辑