当前位置:编程学习 > C#/ASP.NET >>

递归枚举排列、组合的C#源码

大约是2001年时候用VS7 beta写的一点东西了,现在回看起来不是一般的幼稚。。。好处是还能运行:),看到CSDN上有朋友要C# 的代码,我也不揣简陋,献丑了。(转换成VS03的工程了) 
Combinatorics.cs代码清单
using System;
using System.Collections;
using System.Data;
     /// <summary>
     /// 组合数学函数集
     /// </summary>
     public class Combinatorics
     {        
    #region 公共函数
    
    /// <summary>
    /// 把二维整形数组转换为数据表
    /// </summary>
    public static DataTable TwoDemisionIntArrayToDataTable(int[, ]source)
    {
           DataTable dt = new DataTable();
           DataRow dr;
           int i, j;
    
           int b1 = source.GetUpperBound(0), b2 = source.GetUpperBound(1);           //获取二维表的各维长度               
补充:asp.net教程,C语言 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,