![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#一些事
panpanguo
这个作者很懒,什么都没留下…
展开
-
本机机器的目录读取
<br />using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.IO; namespace Wrox.ProCSharp.FilesAndRegistry { /// <summary> /// Summary description f原创 2011-01-02 00:11:00 · 371 阅读 · 0 评论 -
在窗口上绘图
<br /> protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); Graphics dc = e.Graphics; dc.DrawString("This is a groovy string", haettenschweilerFont, blackBrush, 10, 10);原创 2011-01-02 00:31:00 · 351 阅读 · 0 评论 -
重载例子
<br />using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication5 { struct Vector { public double x, y, z; public Vector(double x, double y, double z) { this.x = x;原创 2011-01-01 20:52:00 · 431 阅读 · 0 评论 -
委托简单例子
<br />C#中的委托类型使用<br />using System; namespace Wrox.ProCSharp.AdvancedCSharp { delegate double DoubleOp(double x);//声明一个委托类型. class MainEntryPoint { /// <summary> /// 程序入口. /// </summary> static void Main()原创 2011-01-01 12:57:00 · 278 阅读 · 0 评论 -
简单的异常例子
<br />using System; namespace Wrox.ProCSharp.AdvancedCSharp { public class MainEntryPoint { public static void Main() { string userInput; while ( true ) { try {原创 2011-01-01 13:08:00 · 324 阅读 · 0 评论 -
在窗口上显示图片
<br />using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; namespace DisplayPicture { /// <summary> /// Summary description for Form1. /// </summary> public原创 2011-01-02 00:57:00 · 312 阅读 · 0 评论 -
Call private Method.
class Program { static void Main(string[] args) { MethodInfo method = typeof(Calculate).GetMethod("add", Bin原创 2011-09-17 14:15:20 · 812 阅读 · 0 评论