资源简介
调用示例:
//数组列表 string[] array = { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10" }; //在其中选择6个数字 int lowerIndex = 6; var combinations = new Facet.Combinatorics.Combinations<String>( array, lowerIndex, Facet.Combinatorics.GenerateOption.WithoutRepetition ); List<string> list = new List<string>(); foreach (IList<String> combis in combinations) { string[] arr = new string[combis.Count]; combis.CopyTo(arr,0); String combi = String.Join(" ",arr ); //Console.WriteLine(combi); list.Add(combi); } //将组合结果总数以及具体值 输出 MessageBox.Show(list.Count.ToString() "\r\n" string.Join(",\r\n",list.ToArray()));
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace TextSumProblemSample {
static class Program {
///
/// The main entry point for the application.
///
[STAThread]
static void Main() {
Application.EnableVisualstyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new TextSumForm());
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1099 2008-05-14 10:55 CombinatoricsSample\CombinatoricsSample.sln
目录 0 2008-05-16 08:37 CombinatoricsSample\TextSumProblemSample\
目录 0 2008-05-11 12:47 CombinatoricsSample\TextSumProblemSample\bin\
目录 0 2008-05-11 13:35 CombinatoricsSample\TextSumProblemSample\bin\Debug\
目录 0 2008-05-24 12:00 CombinatoricsSample\TextSumProblemSample\bin\Release\
目录 0 2008-05-11 10:52 CombinatoricsSample\TextSumProblemSample\Combinatorics\
文件 14044 2008-04-28 11:02 CombinatoricsSample\TextSumProblemSample\Combinatorics\Combinations.cs
文件 716 2008-04-28 11:02 CombinatoricsSample\TextSumProblemSample\Combinatorics\GenerateOption.cs
文件 1523 2008-04-28 11:02 CombinatoricsSample\TextSumProblemSample\Combinatorics\Ime
文件 18834 2008-05-16 08:48 CombinatoricsSample\TextSumProblemSample\Combinatorics\Permutations.cs
文件 6378 2008-04-21 21:17 CombinatoricsSample\TextSumProblemSample\Combinatorics\SmallPrimeUtility.cs
文件 16604 2008-04-28 11:02 CombinatoricsSample\TextSumProblemSample\Combinatorics\Variations.cs
文件 7406 2008-05-11 13:09 CombinatoricsSample\TextSumProblemSample\Facet.ico
目录 0 2008-05-24 12:00 CombinatoricsSample\TextSumProblemSample\obj\
目录 0 2008-05-11 13:35 CombinatoricsSample\TextSumProblemSample\obj\Debug\
目录 0 2008-04-28 15:35 CombinatoricsSample\TextSumProblemSample\obj\Debug\Refactor\
目录 0 2008-04-28 15:14 CombinatoricsSample\TextSumProblemSample\obj\Debug\TempPE\
目录 0 2008-05-24 12:00 CombinatoricsSample\TextSumProblemSample\obj\Release\
目录 0 2008-05-24 12:00 CombinatoricsSample\TextSumProblemSample\obj\Release\TempPE\
文件 478 2008-05-11 13:15 CombinatoricsSample\TextSumProblemSample\Program.cs
目录 0 2008-04-28 15:14 CombinatoricsSample\TextSumProblemSample\Properties\
文件 1320 2008-04-28 15:14 CombinatoricsSample\TextSumProblemSample\Properties\AssemblyInfo.cs
文件 2867 2008-05-11 13:15 CombinatoricsSample\TextSumProblemSample\Properties\Resources.Designer.cs
文件 5612 2008-04-28 15:14 CombinatoricsSample\TextSumProblemSample\Properties\Resources.resx
文件 1101 2008-05-11 13:15 CombinatoricsSample\TextSumProblemSample\Properties\Settings.Designer.cs
文件 249 2008-04-28 15:14 CombinatoricsSample\TextSumProblemSample\Properties\Settings.settings
文件 5191 2008-05-14 10:55 CombinatoricsSample\TextSumProblemSample\TextSumForm.cs
文件 16930 2008-05-14 10:55 CombinatoricsSample\TextSumProblemSample\TextSumForm.Designer.cs
文件 17425 2008-05-14 10:55 CombinatoricsSample\TextSumProblemSample\TextSumForm.resx
文件 3783 2008-05-11 17:47 CombinatoricsSample\TextSumProblemSample\TextSumProblem.cs
文件 3827 2008-05-11 13:15 CombinatoricsSample\TextSumProblemSample\TextSumProblemSample.csproj
............此处省略1个文件信息
- 上一篇:C# 排列组合类源码 以及调用
- 下一篇:MD5值校正工具源码
相关资源
- C#联通网络宽带测试 拨号
- C#百度指数抓取方法(2012年版本已失
- C# 隐藏某个磁盘分区
- C# 读取并编辑window系统的右键菜单
- C#自定义屏保(不断滚动的文字)
- C#winform打印指定区域 -控件拖动 -设置
- C#使用Hook进行改键
- 提供C#调用系统API函数弹出或收起光驱
- 通过C#自带的头文件(类)获取Windo
- C#获取电脑CPU以及内存使用率
- 利用uu云打码平台的lib实现的c#打码平
- tf-idf一种计算方法
- C# pop3 邮件接收程序
- C# 邮件群发示例 源码下载18952
- 动态抓取IPC#实现
- XXTEA算法的C#实现和JS实现,可以互相
- C# 飞行棋 游戏源码(面向对象入门)
- 基于WinPcap的C# ARP欺骗软件().rar
- C#网络应用编程 矩阵并行计算练习
- 《C#版Ftp软件源码》
-
C# 播放铃声(AxWindowsMediaPla
yer)最新 - C# 把图片显示成椭圆形状
- C# 水平交错效果显示图像
- winform 浮雕效果的图像
- c# 底片效果显示图像就像旧式相机的
- 积木效果显示图像
- C# 隐形窗体 (没有边框,没有标题栏
- browerPhotoC#网页截图(不打开网页)
- C# 模拟时钟(自绘Graphics)
- C#之WPF重绘动态正弦余弦曲线
评论
共有 条评论