惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
A
Arctic Wolf
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
Threatpost
P
Proofpoint News Feed
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
www.infosecurity-magazine.com
www.infosecurity-magazine.com
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
V
Vulnerabilities – Threatpost
V
V2EX
Webroot Blog
Webroot Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Privacy & Cybersecurity Law Blog
P
Privacy International News Feed
T
Tor Project blog
P
Proofpoint News Feed
T
Tailwind CSS Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Vercel News
Vercel News
Security Archives - TechRepublic
Security Archives - TechRepublic
MongoDB | Blog
MongoDB | Blog
T
Troy Hunt's Blog
Google DeepMind News
Google DeepMind News
NISL@THU
NISL@THU
C
CERT Recently Published Vulnerability Notes
W
WeLiveSecurity
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
GbyAI
GbyAI
Y
Y Combinator Blog
T
Threat Research - Cisco Blogs
S
Security Affairs
Google Online Security Blog
Google Online Security Blog
S
Securelist
Spread Privacy
Spread Privacy
Recent Announcements
Recent Announcements
The Register - Security
The Register - Security
C
Cybersecurity and Infrastructure Security Agency CISA
爱范儿
爱范儿
H
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Scott Helme
Scott Helme
The Cloudflare Blog
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
B
Blog RSS Feed
AWS News Blog
AWS News Blog

博客园 - 洪虎

Windows环境下安装Python 建立批命令快速修改本机IP地址 网络经典命令 - 洪虎 - 博客园 “指定域的名称或安全标识SID与该域的信任信息不一致”的解决方法 建立主DNS区域和辅助DNS区域的最佳实践 无人职守安装 XP 电脑黑客基本技术和入侵的关键字以及电脑攻防应用 建立一个可修改Windows域用户密码的web页面 修复SQL2000中损坏的表 将Excel转换为CSV的VBA代码 - 洪虎 - 博客园 用命令检查电脑是否被安装木马 DateTime.ToString 方法 - 洪虎 - 博客园 使用DataDynamics.ActiveReports 创建子报表 错误的SQL脚本,错误消息 4104 - 洪虎 - 博客园 适配器模式 如何在 Reporting Services 开发基于用户权限的报表呢? 委托模式 接口模型 使用反射检查程序集,实现自动更新
在C#中自定义异常 - 洪虎 - 博客园
洪虎 · 2006-11-06 · via 博客园 - 洪虎

系统发现程序运行或其他问题时通常会以异常的方式报告错误。

那么在C#中如何定义自己的异常呢。可以参考一下代码。

throw     new    Exception("自定义错误信息.......................");

或者自定义一个异常类,让这个类继承自System.Exception,这样也能用 “ throw ” 抛出这个异常。

洪虎

2006-11-6

posted @ 2006-11-06 17:34  洪虎  阅读(965)  评论(0)    收藏  举报