摘要: 原文:https://www.cnblogs.com/gguozhenqian/p/4288451.html 需要添加引用System.Windows.Forms 1 public class AutoSizeFormClass 2 { 3 //(1).声明结构,只记录窗体和其控件的初始位置和大小。 阅读全文
posted @ 2018-08-09 17:54 Connaught_yu 阅读(1067) 评论(6) 推荐(2)
摘要: 方法一: public static int Sum(int m) { int sum = 0; bool bol = true; for (int i=1;i<=m;i++) { if (bol == true) { sum += i; } else { sum -= i; } bol = !bo 阅读全文
posted @ 2018-08-09 15:02 Connaught_yu 阅读(1752) 评论(0) 推荐(0)
摘要: //冒泡排序 public static int[] Bubbling(int[] s) { int a; for (int i = 0; i < s.Length-1; i++) { for (int j =i+ 1; j < s.Length; j++) { if (s[i] >s[j]) { 阅读全文
posted @ 2018-08-09 14:44 Connaught_yu 阅读(149) 评论(0) 推荐(0)
摘要: 方法一: public static string Reverse(string name) { if (String.IsNullOrEmpty(name)) { throw new Exception("字符串不能为空!"); } StringBuilder sb = new StringBui 阅读全文
posted @ 2018-08-09 12:14 Connaught_yu 阅读(648) 评论(0) 推荐(0)