
C#
成长的小码农
出来混迟早是要还的!!!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C#计算器
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespac原创 2013-02-27 20:16:47 · 370 阅读 · 0 评论 -
定义委托、返回值委托、带参委托
1.方法签名:参数类型,参数个数,返回值.(方法有参无参) 2.委托是方法的指针,委托的签名必须和要引用的方法的签名一致 3.委托链:使用+=将一个委托实例指向多个方法。最先执行的方法就是最先指向的方法。 定义委托 using System; using System.Collections.Generic; using System.Linq; using System.Text;原创 2013-06-17 21:45:51 · 4823 阅读 · 1 评论 -
winform\线程下载网页源代码
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Sy原创 2013-06-18 17:19:09 · 669 阅读 · 0 评论 -
多线程的小示例
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; using System.Threading; namespace ConsoleApplication1 { class Program {原创 2013-06-18 17:21:20 · 574 阅读 · 0 评论 -
Windows多线程及线程池
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Sy原创 2013-06-25 21:10:03 · 766 阅读 · 0 评论 -
windows的文件拷贝
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Sy原创 2013-06-25 21:06:02 · 838 阅读 · 0 评论 -
缓存失效的三种方式
效果当在规定时间内访问一个网页时,网页上的内容咱是保持不变,时间一过,网页上的内容就会重新访问服务器,获取数据。 前台: 后台: protected void Page_Load(object sender, EventArgs e)转载 2013-07-02 08:47:22 · 760 阅读 · 0 评论 -
将大写日期转成阿拉伯数字类型的
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namesp转载 2013-07-01 21:09:03 · 612 阅读 · 0 评论 -
Application详细使用
1.Application的创建 Application["application名称"] = "application的值"; 2.Application的使用 string str = Application["application名称"]; PS:常用的属性和方法 All 返回全部的Application对象变量到一个对象数组 AllKeys 返回全部的Applicat原创 2013-07-02 15:08:23 · 992 阅读 · 0 评论 -
C#面试题之一
下面是一个由*号组成的4行倒三角形图案。要求:1、输入倒三角形的行数,行数的取值3-21之间,对于非法的行数,要求抛出提示“非法行数!”;2、在屏幕上打印这个指定了行数的倒三角形。 int n = 0; Console.Write("输入倒三角形的行数,行数的取值3-21之间:"); try原创 2013-07-04 08:37:38 · 1141 阅读 · 0 评论 -
C#的继承、多态简单小示例
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace ConsoleApplication1 { class Program { static void Main(str原创 2013-07-04 20:31:52 · 727 阅读 · 0 评论 -
用户自定义控件的建立及使用、定义事件
Web页面无法直接调用用户自定义控件里面的控件 定义事件 public event Errorinfo(委托名) On_errorinfo(事件名); Web前台代码 http://www.w3.org/1999/xhtml"> Web后台原创 2013-06-17 21:50:15 · 1085 阅读 · 0 评论 -
网页链接Oracle实现数据的增删改查
前台代码原创 2013-06-03 21:01:19 · 1652 阅读 · 0 评论 -
C#中for循环使用的小例子
从一个整数数组中取出最大的整数 int[] nums = { 1, 3, 5, 2, 7, 4 }; int max = nums[0]; for (int i = 0; i { if (nums[i] > max) {原创 2013-02-27 20:12:44 · 817 阅读 · 0 评论 -
C#冒泡排序
冒泡排序 int[] aaa = { 5, 12, 3, 52, 2, 67 }; for (int j = 0; j { for (int i = 1; i { int temp; if原创 2013-02-28 20:30:59 · 347 阅读 · 0 评论 -
在gridview中用checkbox选择及排序功能
前台代码 http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> http://www.w3.org/1999/xhtml"> function showinfo() { if (confirm('真的要删除吗') == false)原创 2013-04-01 20:39:56 · 1343 阅读 · 0 评论 -
对Dictionary的理解
当你把字典声明的静态时,关闭网页后,你存储的数据仍然会存储在内存中,例如: 前台代码: 后台代码: static Dictionary di = new Dictionary(); protected转载 2013-04-15 22:11:55 · 481 阅读 · 0 评论 -
控制台应用程序下的计算器(调用子类)
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) {原创 2013-05-27 19:35:10 · 704 阅读 · 0 评论 -
C#类中对字段、属性、方法的介绍
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace C字段属性方法 { class Program { static void Main(string[] args) {原创 2013-05-27 19:38:54 · 579 阅读 · 0 评论 -
C#中继承
父类computer代码 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace leiku { public class computer { public computer() { }//类中本身自带的无参构造函数原创 2013-05-28 22:34:41 · 712 阅读 · 0 评论 -
C#构造函数(小示例证明)
继承时父类必须声明为public 1.任何类都有一个无参的构造函数,是由.NET默认提供的。 2.当在类中自定义构造函数之后,默认的无参构造函数会被替换,就不存在了 3.子类默认从父类中继承了无参构造函数,所以当我们在父类中用自定义构造函数替换默认函数之后,会报错 4.解决方法:既然子类默认继承的是父类的无参构造函数,就可以在父类中自定义构造函数之后,再显式的定义无参构造函数即可;也可以在原创 2013-05-28 22:30:33 · 574 阅读 · 0 评论 -
winform版小闹钟
闹钟类 Block.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ClassLibrary1 { public class Block { public string BlockTime { ge原创 2013-06-03 20:17:35 · 799 阅读 · 0 评论 -
面试题之百钱百鸡和小明买汽水
公鸡5钱一只,母鸡3钱一只,小鸡3只一钱 100块钱怎样能买一百只鸡 for (int i = 0; i { for (int j = 0; j { for (int k = 0; k {原创 2014-02-09 14:50:42 · 1170 阅读 · 0 评论