![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
学习文档
KhalidDu
这个作者很懒,什么都没留下…
展开
-
c#中get set 的使用
在早期学习c#的过程中,经常遇到这样的语句:public string StudentName{ get{return stuName;} set{stuName=value;}}当时也不是很明白为什么要这样?在许多面向对象程序设计语言中,属性 { Student stu = new Student(); Console.转载 2017-09-29 11:30:54 · 1214 阅读 · 0 评论 -
WPF异常捕获,并使程序不崩溃!
在.NET中,我们使用try-catch-finally来处理异常。但,当一个Exception抛出,抛出Exception的代码又没有被try包围时,程序就崩溃了。这些异常往往是你没有注意到的。在WPF中,提供了一种处理这些个异常的方式。举例来说明。1.先抛出个异常,不用try包围它。在MainWindow上添加一个如下的Button。Wi转载 2017-09-29 14:02:49 · 9578 阅读 · 0 评论 -
C# WINFORM 捕获全局异常
using System;using System.Collections.Generic;using System.Windows.Forms;using System.IO;namespace GobalException{ static class Program { /// /// 应用程序的主入口点。转载 2017-09-29 14:05:52 · 611 阅读 · 0 评论