登录
首页 » C# » C# 异常处理常用示例源码

C# 异常处理常用示例源码

于 2013-02-13 发布
0 234
下载积分: 1 下载次数: 0

代码说明:

除零异常、空引用、自定义异常示例,适合刚入门的同学学习

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • SPY++ 工具下载,非源码
    查看窗口句柄
    2014-11-26下载
    积分:1
  • C# 套打Demo
    套打Demo 【核心代码】using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Drawing.Printing;namespace Print_Demo{ public partial class Form1 : Form { public PrintDocument printDt = new PrintDocument(); //打印文档对象 Font printFont; //打印使用的字体 public Form1() { InitializeComponent(); } void printDt_PrintPage(object sender, PrintPageEventArgs e) { float pointX = 10; float pointY = 10; e.Graphics.DrawString("打印内容", new Font("宋体", 16F), Brushes.Black, pointX 60, pointY); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 26,pointX 300,pointY 26); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 35); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 56, pointX 300, pointY 56); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 65); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 86, pointX 300, pointY 86); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 95); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 116, pointX 300, pointY 116); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 125); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 146, pointX 300, pointY 146); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 155); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 176, pointX 300, pointY 176); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 185); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 206, pointX 300, pointY 206); e.Graphics.DrawString("检测结果", printFont, Brushes.Black, pointX, pointY 233); e.Graphics.DrawString("通过", new Font("宋体",22F,FontStyle.Bold), Brushes.Black, pointX 90, pointY 225); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 265, pointX 300, pointY 265); e.Graphics.DrawString("单位名称", printFont, Brushes.Black, pointX, pointY 275); } private void Form1_Load(object sender, EventArgs e) { printDt.PrintPage = new PrintPageEventHandler(printDt_PrintPage); printFont = new Font("宋体", 12F); } private void btnPrint_Click(object sender, EventArgs e) { //PrintDialog printDlg = new PrintDialog(); //printDlg.Document = printDt; //printDlg.AllowPrintToFile = true; //printDlg.AllowCurrentPage = true; //printDlg.AllowSelection = true; //printDlg.ShowDialog(); //printDlg.ShowDialog(); printDt.Print(); } private void btnLook_Click(object sender, EventArgs e) { PrintPreviewDialog printPreview = new PrintPreviewDialog(); printPreview.PrintPreviewControl.Document = printDt; printPreview.ShowDialog(this); } }}
    2021-05-06下载
    积分:1
  • C# 多切换 实例源码下载
    C# 多语言切换 实例源码下载
    2013-10-03下载
    积分:1
  • C小白变怪兽全本.pdf
    适合C语言入门和进阶,严长生老师讲的非常好,VIP内容网上搜不到免费的,这个是我闲鱼购买然后自己把内容合并成本的,原来是一本免费章节,一本VIP内容,章节却是连在一起的,不方便用
    2020-12-03下载
    积分:1
  • 多说-社会化评论系统 完整实例源码下载
    多说社会化评论系统 源码
    2014-06-12下载
    积分:1
  • Winform中修改WebBrowser控件User-Agent的方法
    Winform中修改WebBrowser控件User-Agent的方法
    2013-12-15下载
    积分:1
  • pop3 接收qq邮箱邮件 实例源码下载
    pop3 接收qq邮箱邮件 实例源码下载
    2015-01-16下载
    积分:1
  • Am4电测机点位监控(C#串口通信)
    【实例简介】
    2021-08-07 00:30:54下载
    积分:1
  • WebClient 实现网络文件下载实例源码(带进度)
    WebClient 实现网络文件下载实例源码(带进度)
    2014-06-11下载
    积分:1
  • C#界面美化,大型餐饮业订餐(含 数据库以及完整源码)
    含 数据库以及完整源码
    2015-01-19下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载