相关分类: Java技术 C/C++ VB delphi
  • 用设计模式固化C#程式

    译序: C#进阶文章。译者对Samir提供的C#例子进行了简单整理(作者提供的某些代码在译者的环境中无法通过编译),并编写了对应的C 示例,一并置于译注中,以便读者比对。译文中任何C#、C 程式调试环境均为Microsoft Visual Studio.NET 7.0 Beta2。 概要: 通过提供一个...

    2008-02-23 05:26:44

  • 数据结构和算法(C#实现)系列---演示篇(三)

    数据结构和算法(C#实现)系列---演示篇(三) Heavenkiller(原创) public static void ShowSortedList_Polynomial() { //100 10*x x^2 1 10*x 100x^2 SortedList tmpListA=new SortedList(); SortedList tmpListB=new SortedList(); SortedList tmpListC=new SortedList()...

    2008-02-23 05:26:43

  • 数据结构和算法(C#实现)系列---演示篇(二)

    数据结构和算法(C#实现)系列---演示篇(二) Heavenkiller(原创) public static void ShowGeneralTree_travel() { IEnumerator tmpIEnum; Tree.TraversalType travelType=0; //---------------------提示---------------------------- Console.WriteLine("please choose...

    2008-02-23 05:26:44

  • 数据结构和算法(C#实现)系列---AVLTree(二)

    数据结构和算法 (C# 实现 ) 系列 ---AVLTree (二) //---------------override-------------------- public override void AttachKey( object _obj) { if (!IsEmpty()) throw new Exception("My:this node must be a empty tree node!"); this .key=_obj; //产生一个d...

    2008-02-23 05:26:43

  • 数据结构和算法(C#实现)系列---AVLTree(一)

    数据结构和算法 (C# 实现 ) 系列 ---AVLTree (一) using System; using System.Collections; namespace DataStructure { /// summary /// AVLTree 的摘要说明。-----平衡二叉查找树 /// /summary public class AVLTree:BST { protected int height; //空树的高定义为...

    2008-02-23 05:26:41

  • 数据结构和算法(C#实现)系列---二叉堆(数组实现)

    数据结构和算法 (C# 实现 ) 系列 --- 二叉堆(数组实现) using System; using System.Collections; namespace DataStructure { /// summary /// BinaryHeap 的摘要说明。-------二叉堆(基于数组的实现) /// /summary public class BinaryHeap:IPriorityQueue { protec...

    2008-02-23 05:26:39

  • C#算法(四)快速排序

    前面我已推出了三种排序的算法,比较简单。今天我又写了快速排序的算法。希望多多指教。具体的思想,我不做答了。前人的经验。 using System; namespace QuickSorter { public class QuickSorter { private void Swap(ref int l,ref int r) { int s; s=l; l=r; r=s; }...

    2008-02-23 05:26:39

  • C#算法(三)希尔排序

    朋友们,我最近加紧写C#的一些算法。选择排序,插入算法是我已推出的。现推出希尔排序.今后,如有时间我将依次推出其他的算法编写。 希尔排序是将组分段,进行插入排序. 对想提高C#语言编程能力的朋友,我们能够互相探讨一下。 如:下面的程式,并没有实现多态,来,帮他...

    2008-02-23 05:26:38

  • C#算法(二)插入排序

    朋友们,我最近加紧写C#的一些算法。选择排序已推出的。现推出插入算法。 对想提高C#语言编程能力的朋友,我们能够互相探讨一下。 如:下面的程式,并没有实现多态,来,帮他实现一下。 using System; public class InsertionSorter { public void Sort(int [] list) {...

    2008-02-23 05:26:38

  • 对C#泛型中的new()约束的一点思考

    对于new()约束,大家可能有一个误解,以为使用了new约束之后,在创建对象时和非泛型的版本是一致的: public class TesterT where T:new() { public Tester() { t = new T();//等同于非泛型版本的new? 例如 object o = new object();? } private T t; } 事实上,使用ne...

    2008-02-23 05:26:37

2