04 2011 档案
摘要:C#中简单的正则表达式(也经常会用到的) 第一个:验证输入的字符串是否为数字View Code /// <summary> /// 验证输入字符串为数字 /// </summary> /// <param name="P_str_num">输入字符</param> /// <returns>返回一个bool类型的值</returns> public bool validateNum(string P_str_num) { return Regex.IsMatch(P_str_num, "^[0
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Exerice1{ public class Program { public static void Main(string[] args) { int[] count = new int[15] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }; for (int i = 0; i < 5; i++) { for (int j = 0; j &l
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Exerice{ public class Program { public static void Main(string[] args) { int[] count = new int[5]; // 需要排序的数组 int i, j; // 循环变量 int temp; // 临时变量 //读入数组 Console.WriteLine("请输入5个数:"); for (i = 0; i &
阅读全文
摘要:System.Collections 命名空间包含接口和类,这些接口和类定义各种对象(如列表、队列、位数组、哈希表和字典)的集合。System.Collections.Generic 命名空间包含定义泛型集合的接口和类,泛型集合允许用户创建强类型集合,它能提供比非泛型强类型集合更好的类型安全性和性能。System.Collections.Specialized 命名空间包含专用的和强类型的集合,例如,链接的列表词典、位向量以及只包含字符串的集合。 ArrayList 类:使用大小可按需动态增加的数组。using System;using System.Collections.Generic;u
阅读全文
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace DVL.Model{ public class TestModeol { #region 每页记录数 private int pageCount = 5; public int PageCount { get { return pageCount; } set { pageCount = value; } } #endregion #region 总记录数 private int total; public in
阅读全文

浙公网安备 33010602011771号