摘要:本例描述几个常用的异常处理,及可能出现的问题: finally的相关使用 嵌套异常 捕获多线程的异常[使用事件通知的方式,将异常包装到主线程中] using System; using System.Threading.Tasks;namespace ConsoleApp_HandleException{ class Program { static void Main...
阅读全文
弹指一挥间好好做事,学习待人 (大数据分析/.NET/JAVA)技术交流QQ:860280456; .NET/JAVA技术交流群:192028174 |
04 2014 档案
摘要:本例描述几个常用的异常处理,及可能出现的问题: finally的相关使用 嵌套异常 捕获多线程的异常[使用事件通知的方式,将异常包装到主线程中] using System; using System.Threading.Tasks;namespace ConsoleApp_HandleException{ class Program { static void Main...
阅读全文
摘要:using System;using System.Collections.Generic;using System.ComponentModel; using System.Runtime.InteropServices; namespace ConsoleApp_DisposeResources{ class Program { static void Main(s...
阅读全文
摘要:using System;using System.Runtime.Serialization;//子类负责父类的序列化(如果父类未实现序列化)namespace ConsoleApp_SerializableParentByChild{ class Program { static void Main(string[] args) { ...
阅读全文
摘要:将类型Person序列化为文件后,反序列化该文件为另一个类型PersonAnother,以下是相关代码: using System;using System.Runtime.Serialization;namespace ConsoleApp_SerializableToAnotherObj{ class Program { static void Main(strin...
阅读全文
摘要:调用: using System;namespace ConsoleApp_Serializable{ class Program { static void Main(string[] args) { Person mike = new Person() { Age = 21, Name = "Mike" }; ...
阅读全文
|