- 博客(37)
- 资源 (5)
- 收藏
- 关注
原创 单链表排序及克隆
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 单链表排序{ /// /// 运算符重载 /// public class MyString { public string Val { get
2013-01-28 19:32:24 454
原创 单链表
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 单链表{ class Program { static void Main(string[] args) { LinkList myL
2013-01-28 19:29:48 342
原创 运算符重载
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 运算符重载{ class Program { static void Main(string[] args) { myString
2013-01-28 19:28:37 284
原创 时间复杂度
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 时间复杂度{ class Program { static void Main(string[] args) { int count
2013-01-28 19:27:35 455
原创 学生list集合
using System;using System.Collections.Generic;using System.Collections;using System.Linq;using System.Text;namespace 学生list集合{ class Program { static void Main(string[] ar
2013-01-28 19:24:24 572
原创 ArrayList排序
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Collections;namespace ArrayList排序{ /*1)自定义Book类,具有三种属性:书名,分类,价格.2)定义2个排序类,实现IComparer接口的类,一个按
2013-01-28 19:19:33 782
原创 进制转换
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 进制转换{ class Program { static void Main(string[] args) { string s
2013-01-28 19:18:17 251
原创 HashTab练习
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Collections;namespace 泛型HashTab{ class Program { static void Main(string[] args)
2013-01-28 19:17:19 358
原创 Stack
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Stack{ class Program { static void Main(string[] args) { Stack na
2013-01-28 19:16:02 297
原创 Queue
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Queue{ class Program { static void Main(string[] args) { Queue q
2013-01-28 19:14:52 492
原创 List集合
using System;using System.Collections.Generic;using System.Collections;using System.Linq;using System.Text;namespace List集合{ class Program { static void Main(string[] args)
2013-01-28 19:13:45 342
原创 HashTable
using System;using System.Collections.Generic;using System.Linq;using System.Collections;using System.Text;namespace HashTable{ class Program { static void Main(string[] args)
2013-01-28 19:10:36 288
原创 值参数,输出参数和引用参数
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ParaDemo{ class Program { static void Main(string[] args) { //===
2013-01-26 16:27:49 499
原创 不规则数组实例
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 交错数组{ class Program { static void Main(string[] args) { int[][] a
2013-01-26 16:22:29 619
原创 二维数组练习
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication3{ class Program { static void Main(string[] args) {
2013-01-26 16:11:32 561
原创 数组基本操作
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication3{ class Program { static void Main(string[] args) {
2013-01-26 15:41:15 387
原创 简单的线性表-顺序表
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 顺序表{ class Program { static void showDatas(SeqList list) { int cou
2013-01-26 14:47:19 318
原创 委托实现多态
using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace 委托实现多态{ publicdelegate int anydelege(int x,int y); publicdelegate anydelegeanydelegeanydeleg
2013-01-17 20:35:05 596
原创 委托多线程
using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace 委托多线程{ classProgram { publicdelegate void Anydelegate(inti);//定义委托 staticvoid
2013-01-17 20:33:40 306
原创 简单的委托
v 定义委托跟定义方法类似,只是没有方法体,语法如下:Ø public delegate void Login(stringname,string password);v 使用委托需要执行以下步骤。Ø (1)定义委托Ø (2)实例化委托:ü 就要调用该委托的构造函数,并将与该委托关联的方法作为其参数传递。Ø (3)调用委托:ü 用委托对方法进行实例化,调用委托与调用方法类
2013-01-17 20:31:33 350
原创 接口约定参数
using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace 接口约定参数{ classProgram { staticvoid Main(string[]args) { DoMath m1
2013-01-17 20:23:50 364
原创 is小实例
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace IS{ class Program { static void Main(string[] args) { IPerson adm
2013-01-17 20:18:57 234
原创 接口的组合和继承
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 接口的组合和继承{ class Program { static void Main(string[] args) { //使用类
2013-01-17 16:06:31 385
原创 接口的简单行为约束
using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace 接口的简单行为约束{ classProgram { staticvoid Main(string[]args) { house
2013-01-17 16:03:35 789
原创 接口的基本使用
Ø OOP中,接口同样是一种标准和规范,它可以约束类的行为,使不同的类能达到一个统一的规范。C#接口中可以包含属性、方法和索引器等,不能包含字段。但是接口中的属性和方法都不能实现。这好比是更加抽象的抽象类。 v 接口用interface关键字声明,v 举例:1. public interface IPerson2. {3. int Name
2013-01-17 16:02:37 384
原创 委托
v定义委托跟定义方法类似,只是没有方法体,语法如下:Ø public delegate void Login(stringname,string password);v使用委托需要执行以下步骤。Ø (1)定义委托Ø (2)实例化委托:ü 就要调用该委托的构造函数,并将与该委托关联的方法作为其参数传递。Ø (3)调用委托:ü 用委托对方法进行实例化,调用委托与调用方法类似,
2013-01-17 16:01:18 269
原创 多态实现
继承inheritance:实现代码的复用,建立类的层次关系。多态Ploymorphism:理解多态原理,用抽象类和抽象方法,以及虚函数实现多态。封装Encapsulation:保证对象自身数据的完整性、安全性。v 在基类Person中声明抽象方法Login(),让它约束子类,必须实现不同的Login(),从而实现多态。v (1)抽象方法是一个没有方法体的方法,用关键字
2013-01-17 15:58:32 286
原创 AS简单用法
v 关于强制类型转换:Ø 强制类型转换是通过“( )”运算符来实现的。如果转换不通过,则会引发异常。v as用于对象之间进行转换Ø 不会引发异常,Ø 失败时候返回null using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace AS简单用
2013-01-17 15:33:42 772
原创 C#扩展练习题
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 扩展练习题{ class Program { static void Main(string[] args) { #regio
2013-01-05 15:11:01 788
原创 C#基础练习题
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace _2012._12._27_基本练习题{ class Program { static void Main(string[] args)
2013-01-05 14:42:48 875
原创 构造函数
• 定义:构造函数是类中一种特别类型的方法,每次创建类的实例时都将调用它。• • • using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace 构造函数演示{ classProgram { stat
2013-01-04 10:08:50 235
原创 方法
方法是一种用于实现可以由对象或类执行的计算或操作的成员声明方法:[方法修饰符]返回类型 方法名([参数]){}using System;using System.Collections.Generic;using System.Linq;using System.Text; namespace 方法实例{ class Program { sta
2013-01-04 09:31:20 229
原创 访问修饰符
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace { class Program { static void Main(string[] args) { c
2012-12-31 17:59:06 258
原创 属性及一些基本的操作
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 属性的扩展{ class Program { static void Main(string[] args) { classA
2012-12-31 17:22:43 327
原创 简单小八音盒
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace Window
2012-12-25 19:29:40 489
原创 简单小计算器
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace 简单计算机器
2012-12-25 13:30:50 313
原创 C#小练习
using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication3{ class Program { static void Main(string[] args) {
2012-12-24 20:12:52 397
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人