<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[高学宝的专栏]]></title><description><![CDATA[Nothing is impossible]]></description><link>https://blog.youkuaiyun.com/robingaoxb</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; robingaoxb]]></copyright><item><title><![CDATA[C#未捕获异常处理方法]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/7278288</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/7278288</guid><author>robingaoxb</author><pubDate>Tue, 21 Feb 2012 10:11:18 +0800</pubDate><description><![CDATA[C#经常会因为未捕获的异常而造成应用程序崩溃，以下是解决方法：
1.WPF捕获
            Application.Current.DispatcherUnhandledException += new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(Current_DispatcherUnhand]]></description><category></category></item><item><title><![CDATA[http服务器]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6684494</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6684494</guid><author>robingaoxb</author><pubDate>Sat, 13 Aug 2011 16:45:45 +0800</pubDate><description><![CDATA[using System;
02
using System.IO;
03
using System.Net;
04
using System.Text;
05
using System.Threading;
06
 
07
class MainClass {
08
    pri]]></description><category></category></item><item><title><![CDATA[对象序列化补充]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6591905</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6591905</guid><author>robingaoxb</author><pubDate>Fri, 08 Jul 2011 09:45:15 +0800</pubDate><description><![CDATA[using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace DataB]]></description><category></category></item><item><title><![CDATA[C# Excel 行高,列宽,合并单元格,单元格边框线,冻结]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6563082</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6563082</guid><author>robingaoxb</author><pubDate>Thu, 23 Jun 2011 11:53:00 +0800</pubDate><description><![CDATA[ C# Excel 行高,列宽,合并单元格,单元格边框线,冻结2009年03月19日 星期四 15:56private _Workbook _workBook = null;private Worksheet _workSheet = null;private Excel.Application _excelApplicatin = null;_exce]]></description><category></category></item><item><title><![CDATA[重载WndProc]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6535710</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6535710</guid><author>robingaoxb</author><pubDate>Fri, 10 Jun 2011 09:52:00 +0800</pubDate><description><![CDATA[开发时再Form类中可以实现WndProc函数的重载：protected override void WndProc(ref Message m){     base.WndProc(ref m);} 此函数的原型为：LRESULT CALLBACK WindowProc(  __in  HWND hwnd,  __in  UINT uMsg,  __in  W]]></description><category></category></item><item><title><![CDATA[c#获取逻辑硬盘信息]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6532942</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6532942</guid><author>robingaoxb</author><pubDate>Wed, 08 Jun 2011 23:59:00 +0800</pubDate><description><![CDATA[ c#获取逻辑硬盘信息 1、概述    若仅简单获取逻辑驱动器的名称列表我们使用.Net框架的Environment.GetLogicalDrives即可，但是若想获得更多关于磁盘驱动器的信息我们可以使用.Net框架下的System.Management 命名空间所提供的类和委托等对大量管理信息和管理事件的集合进行访问(见http://www.iwebtrados.com.cn]]></description><category></category></item><item><title><![CDATA[SQLite使用]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6461405</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6461405</guid><author>robingaoxb</author><pubDate>Thu, 02 Jun 2011 15:23:00 +0800</pubDate><description><![CDATA[<br /><br />一、             SQLite简介<br />SQLite是遵守ACID的关联式数据库管理系统，它包含在一个相对小的C库中。它是D.RichardHipp建立的公有领域项目。<br />不像常见的客户-服务器范例，SQLite引擎不是个程序与之通信的独立进程，而是连接到程序中成为它的一个主要部分。所以主要的通信协议是在编程语言内的直接API调用。这在消耗总量、延迟时间和整体简单性上有积极的作用。整个数据库（定义、表、索引和数据本身）都在宿主主机上存储在一个单一的文件中。它]]></description><category></category></item><item><title><![CDATA[SQLite技巧]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6461354</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6461354</guid><author>robingaoxb</author><pubDate>Thu, 02 Jun 2011 15:07:00 +0800</pubDate><description><![CDATA[1. 有Sqlite的.net2.0 3.5的驱动，安装后和ole驱动一样用法，大有一些以SQLite***开头的和ole对应一样的类。
连接字符串例如“Data Source=文件名;Pooling=true;FailIfMissing=false”。Pooling=true;FailIfMissing=false有对应的意义，google一下就有啦，我到没有用到这两个设置。
2.就是Datetime类型，和其他有些区别。
他的默认格式是ISO 8601标准字符串，是标准时间。
有内部函数，如下面]]></description><category></category></item><item><title><![CDATA[WCF 聊天室程序代码详细讲解教程]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6336027</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6336027</guid><author>robingaoxb</author><pubDate>Wed, 20 Apr 2011 14:28:00 +0800</pubDate><description><![CDATA[<br />解决方案<br /><br />ChatService 服务端主要的三个文件：App.config，ChatService.cs，Program.cs<br /><br />FormChatClient 客户端主要二个文件：App.config，ChatForm.cs<br /><br />以下为这五个文件的全部代码及讲解，因为打算放在一篇文章里，所以本文会很长。发由本教程目的并不仅仅让初学者了解怎么开发一个聊天室。而是要通过这个例子<br /><br />加深对C#及WCF一些实用特性的了解。]]></description><category></category></item><item><title><![CDATA[volatile修饰符]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6284137</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6284137</guid><author>robingaoxb</author><pubDate>Mon, 28 Mar 2011 17:35:00 +0800</pubDate><description><![CDATA[<br /> <br />volatile 关键字指示一个字段可以由多个同时执行的线程修改。声明为 volatile 的字段不受编译器优化（假定由单个线程访问）的限制。这样可以确保该字段在任何时间呈现的都是最新的值。<br />volatile 修饰符通常用于由多个线程访问但不使用 lock 语句对访问进行序列化的字段。有关在多线程方案中使用 volatile 的示例，请参见如何：创建和终止线程（C# 编程指南）。<br />volatile 关键字可应用于以下类型的字段：<br />引用类型。<br />]]></description><category></category></item><item><title><![CDATA[《你不常用的c#之五》:Thread与ThreadPool的内存之战]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6200495</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6200495</guid><author>robingaoxb</author><pubDate>Tue, 22 Feb 2011 17:06:00 +0800</pubDate><description><![CDATA[<br />Thread与ThreadPool使用的时候在内存里对象是如何分布的呢？ <br />今天我们就从内存堆的角度分析下两者。 <br />先上小白鼠代码：<br />static void Main(string[] args)
        {
            for (int i = 0; i < 30; i++)
            {
                Thread t = new Thread(new ThreadStart(ThreadProc));]]></description><category></category></item><item><title><![CDATA[《你不常用的c#之四》:Array的小抽屉ArraySegment]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6200060</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6200060</guid><author>robingaoxb</author><pubDate>Tue, 22 Feb 2011 14:58:00 +0800</pubDate><description><![CDATA[<br />一:)略谈<br />ArraySegment顾名思义就是Array区块，数组的小抽屉，用于对该数组中元素的范围进行分隔。比如这个数组： <br />String[] myArr = { "Overred", "Medloy", "Xiaoguai", "Hare" }; <br />我们用ArraySegment这个抽屉给装起来就是:<br />ArraySegment<String> arrSeg = new ArraySegment<String>(myArr); <br />只需for一]]></description><category></category></item><item><title><![CDATA[《你不常用的c#之三》:Action 之怪状]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6199891</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6199891</guid><author>robingaoxb</author><pubDate>Tue, 22 Feb 2011 14:05:00 +0800</pubDate><description><![CDATA[例1：static void Main(string[] args)
{
List ls = new List();
for (int i = 0; i  Console.WriteLine(i));
}
foreach (Action action in ls)
{
action();
}
System.Console.Read();
}  输出结果:例2:static void Main(string[] args)
{
List ls = new List();
for (i]]></description><category></category></item><item><title><![CDATA[《你不常用的c#之二》:略谈GCHandle]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6199514</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6199514</guid><author>robingaoxb</author><pubDate>Tue, 22 Feb 2011 11:16:00 +0800</pubDate><description><![CDATA[<br />我们在使用c#托管代码时，内存地址和GC回收那不是我们关心的，CLR已经给我们暗箱操作。<br />但是如果我们在c#中调用了一个非托管代码，比如vc的DLL,而且他有个回调函数，需要引用c#中的某个对象并操作，<br />这时候你就得要小心了。<br />要是非托管代码中用到得托管代码那个对象被GC给回收了，这时候就会报内存错误。<br />所以我们就要把那个对象“钉”住(pin)，让它的内存地址固定，而不被垃圾回收掉，然后最后我们自己管理，自己释放内存,这时候就需要GCHandle,来看个m]]></description><category></category></item><item><title><![CDATA[《你不常用的c#之一》:略谈unsafe]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6199508</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6199508</guid><author>robingaoxb</author><pubDate>Tue, 22 Feb 2011 11:15:00 +0800</pubDate><description><![CDATA[<br /> <br />msdn里讲到:<br />“在 C# 中很少需要使用指针，但仍有一些需要使用的情况。例如，在下列情况中使用允许采用指针的不安全上下文是正确的：处理磁盘上的现有结构涉及内部包含指针的结构的高级 COM 或平台调用方案性能关键代码<br />对于第一和第二点，主要是调win32的api。<br />但是“性能关键代码”这个非常重要。我来举例引申一下。<br />我们都知道像飞信这种大型IM服务端，难免会面临大量的字符处理（协议报文）。<br />如果同时在线100多万，而且大家都同时]]></description><category></category></item><item><title><![CDATA[字节流与结构、类之间的转换]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6186353</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6186353</guid><author>robingaoxb</author><pubDate>Tue, 15 Feb 2011 16:59:00 +0800</pubDate><description><![CDATA[准备知识1.  StructLayoutAttribute类参数说明LayoutKindLayoutKind  值之一，它指定类或结构的排列方式。 Sequential 对象的成员按照它们在被导出到非托管内存时出现的顺序依次布局。这些成员根据在StructLayoutAttribute.Pack中指定的封装进行布局，并且可以是不连续的。Explicit 对象的各个成员在非托管内存中的精确位置被显式控制。每个成员必须使用 FieldOffsetAttribute 指示该字段在类型中的位置。Auto 运行库自动]]></description><category></category></item><item><title><![CDATA[工厂方法模式]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6184299</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6184299</guid><author>robingaoxb</author><pubDate>Mon, 14 Feb 2011 16:09:00 +0800</pubDate><description><![CDATA[工厂方法模式（Factory Method）<br />——.NET设计模式系列之五<br />Terrylee，2004年1月2日<br />概述<br />在软件系统中，经常面临着“某个对象”的创建工作，由于需求的变化，这个对象的具体实现经常面临着剧烈的变化，但是它却拥有比较稳定的接口。如何应对这种变化？提供一种封装机制来隔离出“这个易变对象”的变化，从而保持系统中“其它依赖该对象的对象”不随着需求的改变而改变？这就是要说的Factory Method模式了。<br />意图<br />定义一个用户创建]]></description><category></category></item><item><title><![CDATA[C#中的ref out param关键字]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6176555</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6176555</guid><author>robingaoxb</author><pubDate>Thu, 10 Feb 2011 10:54:00 +0800</pubDate><description><![CDATA[<br />ref是传递参数的地址，out是返回值，两者有一定的相同之处，不过也有不同点。使用ref前必须对变量赋值，out不用。<br />ref 关键字使参数按引用传递。其效果是，当控制权传递回调用方法时，在方法中对参数所做的任何更改都将反映在该变量中。若要使用 ref 参数，则方法定义和调用方法都必须显式使用 ref 关键字。<br />传递到 ref 参数的参数必须最先初始化。这与 out 不同，out 的参数在传递之前不需要显式初始化。<br />尽管 ref 和 out 在运行时的处理方式不同，]]></description><category></category></item><item><title><![CDATA[C#中var关键字用法]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6175533</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6175533</guid><author>robingaoxb</author><pubDate>Wed, 09 Feb 2011 14:40:00 +0800</pubDate><description><![CDATA[<br /><br />var关键字是C# 3.0开始新增的特性，称为推断类型 .<br /><br />可以赋予局部变量推断“类型”var 而不是显式类型。var 关键字指示编译器根据初始化语句右侧的表达式推断变量的类型。推断类型可以是内置类型、匿名类型、用户定义类型、.NET Framework 类库中定义的类型或任何表达式。<br /><br />==================<br />上面的资料有点抽象不好理解.<br />示例:<br />原来我们定义变量,是要这样:<br /><br /]]></description><category></category></item><item><title><![CDATA[委托相关]]></title><link>https://blog.youkuaiyun.com/robingaoxb/article/details/6169691</link><guid>https://blog.youkuaiyun.com/robingaoxb/article/details/6169691</guid><author>robingaoxb</author><pubDate>Sun, 30 Jan 2011 12:02:00 +0800</pubDate><description><![CDATA[Action  委托封装一个方法，该方法只采用一个参数并且不返回值。可以使用此委托以参数形式传递方法，而不用显式声明自定义的委托。该方法必须与此委托定义的方法签名相对应。也就是说，封装的方法必须具有一个通过值传递给它的参数，并且不能返回值。（该方法必须返回 void） 通常，这种方法用于执行某个操作。 以下示例所用的方法是实例化 Action 委托，而不是显式定义一个新委托并将命名方法分配给该委托。（MSDN）using System;
using System.Windows.Forms;

pub]]></description><category></category></item></channel></rss>