![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
编程基础
文章平均质量分 78
师太
程序员之所以犯错误,不是因为他们不懂,而是因为他们自以为什么都懂。
展开
-
C#接口的实现
using System; interface Runner { void run();} interface Swimmer { void swim();} abstract class Animal { abstract public void eat();} class Person转载 2015-01-18 17:54:46 · 319 阅读 · 0 评论 -
委托示例
using System; delegate double Fun( double x ); public class DelegateIntegral{ public static void Main() { Fun fun = new Fun(Math.Sin); double d = Integral(转载 2015-01-21 14:03:47 · 345 阅读 · 0 评论 -
事件示例
using System; public delegate void DownloadStartHandler(object sender, DownloadStartEventArgs e); //声明委托public delegate void DownloadEndHandler(object sender, DownloadEndEventArgs e); publi转载 2015-01-21 14:24:18 · 262 阅读 · 0 评论 -
运算符重载示例
public struct Complex { public double real; public double imaginary; public Complex(double real, double imaginary) { this.real = real; this.imaginary = ima转载 2015-01-21 15:00:16 · 303 阅读 · 0 评论 -
匿名表达式,lambda表达式,Linq的示例
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; usin转载 2015-01-21 14:48:30 · 367 阅读 · 0 评论 -
异常处理示例
using System;public class DataHouse{ public static void FindData( long ID) { if( ID>0 && ID Console.WriteLine( ID ); else throw new DataHouse转载 2015-01-21 15:27:05 · 216 阅读 · 0 评论