当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > 把一个int数组的数字从小到大排列(C#)

ASP.NET
ASP.NET入门教程:ArrayList对象
ASP.NET入门教程:Hashtable对象
ASP.NET入门教程:SortedList对象
ASP.NET入门教程:把XML文件绑定到列表控件
ASP.NET入门教程:Repeater控件
ASP.NET入门教程:DataList控件
ASP.NET入门教程:数据库连接
ASP.NET入门教程:ASP.NET 2.0新特性
ASP.NET入门教程:ASP.NET 2.0母版页
ASP.NET入门教程:ASP.NET 2.0导航
ASP.NET入门教程:HTML服务器控件
ASP.NET入门教程:Web服务器控件
ASP.NET入门教程:Validation服务器控件
HTML服务器控件介绍:HtmlAnchor控件
HTML服务器控件介绍:HtmlButton控件
HTML服务器控件介绍:HtmlForm控件
HTML服务器控件介绍:HtmlGeneric控件
HTML服务器控件介绍:HtmlImage控件
HTML服务器控件介绍:HtmlInputButton控件
HTML服务器控件介绍:HtmlInputCheckBox控件

ASP.NET 中的 把一个int数组的数字从小到大排列(C#)


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 150 ::
收藏到网摘: n/a


using System;
namespace ConsoleApplication1{ /// /// Class1 的摘要说明。 /// class Class1 { /// /// 应用程序的主入口点。 /// [STAThread] static void Main(string[] args) { MinToMax mtm= new MinToMax(); int [] array = {1,2,6,3,8,3,4,0,5,23,52,12,234,235,1232,21,234,123,143,1368}; int[] last=mtm.MTM(array); int n=0; for(int i=0;i System.Console.ReadLine(); // // TODO: 在此处添加代码以启动应用程序 // } }
public class MinToMax { public int[] MTM(int [] array)
{ int[] FianlMTM= new int[array.Length]; for(int j=0;j } FianlMTM[array.Length-(j+1)]=last;
} return FianlMTM; } }}