上一页 1 ··· 3 4 5 6 7
  2016年3月28日
摘要: 5、构造函数传值 第一步 在调用窗体建立构造函数 写入参数ex: public Form2(Sting msg):this() //调用无参的构造函数 { label1.text=msg } 第二步 传值窗体构造调用窗体的实例 ex: string txtMsg=textBox1.text; For 阅读全文
posted @ 2016-03-28 17:29 路上有你F 阅读(302) 评论(0) 推荐(0)
  2016年3月25日
摘要: /// /// 自定义泛型类 /// /// class MyClass { //字段 T[] name = null; /// /// 构造函数 /// //... 阅读全文
posted @ 2016-03-25 16:21 路上有你F 阅读(245) 评论(0) 推荐(0)
摘要: C#上传图片和生成缩略图以及图片预览 因工作需要,上传图片要增加MIME类型验证和生成较小尺寸的图片用于浏览。根据网上代码加以修改做出如下效果图: 前台代码如下: 1 <html xmlns="http://www.w3.org/1999/xhtml"> 2 <head runat="server" 阅读全文
posted @ 2016-03-25 13:50 路上有你F 阅读(484) 评论(0) 推荐(0)
摘要: //字符串为只读数组 string str = "abcdefghijk"; //字符串转换为char类型数组 char[] chs = str.ToCharArray(); chs[0] = 'b'; //把char类型数组转换为字符串 string newStr = new string(chs 阅读全文
posted @ 2016-03-25 12:54 路上有你F 阅读(330) 评论(0) 推荐(0)
  2016年3月11日
摘要: Student s = new Student(); List<Student> list = new List<Student>(); s.Height = "19"; s.Weight = "100KG"; s.Gender = "男"; list.Add(s); //List<int> lis 阅读全文
posted @ 2016-03-11 17:06 路上有你F 阅读(382) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7