随笔分类 - C#
关于C#的随笔
摘要:using System;using System.Windows.Forms;class form_move{ Form f1; bool beginMove = false; int currentXPosition = 0; int currentYPosition = 0; public form_move(Form f) { f1 = f; f.MouseDown += new MouseEventHandler(f_MouseDown); f.MouseMove += new MouseEventHandler(f_MouseMove); f.MouseUp += new Mous
阅读全文
摘要:using System.Data;using System.Data.SqlClient;class connect{ public string cmdstr { get; set; } public string soure { get; set; } public connect(string strcmd,string database,out int i,params string[] arry) { cmdstr = strcmd; soure = "server=(local);database="+database+";trusted_conne
阅读全文
摘要:using System;class Order{ public Order(string a,params double[] arry) { if (a == "正序") { for (int i = 0; i < arry.Length - 1; i++) { for (int j = 0; j < arry.Length - i - 1; j++) { if (arry[j] > arry[j + 1]) { double b; b = arry[j]; arry[j] = arry[j + 1]; arry[j + 1] =b; } } } } e
阅读全文
摘要:将5个小球进行组合,每次取出4个,问一共有多少种取法,将每一种情况列出来。。。?先将情况列出来。。。。下面是代码:private void button1_Click(object sender, EventArgs e) { ArrayList al = new ArrayList(); string str = "abcde"; int i = 0; int a = 0; int b = 0; int c = 0; for (i = 0; i < str.Length; i++)//第1个数取值 { for (a = i + 1; a < str.Lengt
阅读全文

浙公网安备 33010602011771号