2014年3月27日
摘要:
---恢复内容开始---IntroductionThere are several ways of doing asynchronous programming in .Net. Visual Studio 2012 introduces a new approach using the ‘await’ and ‘async’ keywords. These tell the compiler to construct task continuations in quite an unusual way.I found them quite difficult to understand us
阅读全文
posted @ 2014-03-27 09:46
武胜-阿伟
阅读(237)
推荐(0)
摘要:
I thought of naming this post “Evolution of lambdas in C#”, then I decided that wouldn’t be closest appropriate name for the example that I wanted to discuss. The key to understand a lambda in C# is to understand a delegate. Besides the overly blatant blather – “delegates are nothing but function po
阅读全文
posted @ 2014-03-27 08:42
武胜-阿伟
阅读(268)
推荐(0)
2014年3月26日
摘要:
http://download.microsoft.com/download/F/9/6/F967673D-58D6-4E3F-8CA9-11769A0A63B1/TPLDataflow.msi
阅读全文
posted @ 2014-03-26 09:23
武胜-阿伟
阅读(207)
推荐(0)
2014年3月24日
摘要:
There is no such thing like impossible in software development. Impossible just takes longer.I've investigated the problem. If there is really need for Flow Layout, it can be done with a bit of work. Since FlowLayoutPanel lays out the controls without particularly thinking about the number of ro
阅读全文
posted @ 2014-03-24 22:10
武胜-阿伟
阅读(300)
推荐(0)
摘要:
have a problem with a FlowLayoutPanel and I don't know how to solve it.I'm placing two FlowLayoutPanels inside another; the second inner flp has 3 buttons inside.The properties from FlowLayoutPanel child are:FlowDirection=LeftToRight;AutoSize=true;AutoSizeMode=GrowAndShrink;WrapContents=true
阅读全文
posted @ 2014-03-24 22:09
武胜-阿伟
阅读(1114)
推荐(0)
摘要:
Well, the easiest way would be to retain an explicit reference to the buttons you're adding. Otherwise you could add a tag to distinguish them (to be robust against i18n issues). E.g. you can set the tag of "button2" to "button2" and then you can use:foreach(Control ctl in fl
阅读全文
posted @ 2014-03-24 22:06
武胜-阿伟
阅读(172)
推荐(0)
摘要:
For a FlowLayoutPanel, you don't need to specify a location since the controls are arranged for you. Just change "this" to the name of your FlowLayoutPanel:for (int i = 0; i < 5; i++){ Button button = new Button(); button.Tag = i; flowLayoutPanel1.Controls.Add(button);}////Populatin
阅读全文
posted @ 2014-03-24 22:03
武胜-阿伟
阅读(277)
推荐(0)
摘要:
跨AppDomain通信有两种方式 1.Marshal By reference : 传递引用 2.Marshal By Value : 把需要传递的对象 通过序列化反序列化的方式传递过去(值拷贝) 只有标记为 可序列化 Serializable 的类才能通过 Marshal By Value的方式通信以下代码描述了几种跨域通信的情况1.AppDomain是CLR的内部行为,windows完全不清楚有AppDomain的存在2.在新的域中加载Assembly和Type最好用完整限定名(如果直接加载Type, CLR会自动加载Type所在的和所用到的Assembly)3.默认情况下新建...
阅读全文
posted @ 2014-03-24 21:54
武胜-阿伟
阅读(404)
推荐(0)
摘要:
应用程序域(AppDomain)已经不是一个新名词了,只要熟悉.net的都知道它的存在,不过我们还是先一起来重新认识下应用程序域吧,究竟它是何方神圣。应用程序域 众所周知,进程是代码执行和资源分配的最小单元,每个进程都拥有独立的内存单元,而进程之间又是相互隔离的,自然而然,进程成为了代码执行的安全边界。 一个进程对应一个应用程序是一个普遍的认知,而.net却打破了这一惯例,因为它带来了应用程序域这一全新的概念,CLR可使用应用程序域来提供应用程序 之间的隔离,而一个进程中可以运行多个应用程序域,也就是说只要使用应用程序域,我们可以在一个进程中运行多个应用程序,而不会造成进程间调用或进程间切 换
阅读全文
posted @ 2014-03-24 21:38
武胜-阿伟
阅读(347)
推荐(0)
2014年3月23日
摘要:
C# 在SQLite数据库中存储图像更多 0 C# SQLite 建表语句CREATE TABLE [ImageStore]([ImageStore_Id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,[ImageFile] NVARCHAR(20) NULL,[ImageBlob] BLOB NULL);加载图像privateImageLoadImage(){//Create an instance of the Image Class/Object//so that we can store the information about th...
阅读全文
posted @ 2014-03-23 09:00
武胜-阿伟
阅读(4338)
推荐(0)