06 2017 档案

C# "xxx::Invoke"类型的已垃圾回收委托进行了回调。这可能会导致应用程序崩溃、损坏或数据丢失。向非托管代码传递委托时,托管应用程序必须让这些委托保持活动状态,直到确信不会再次调用它们。
摘要:症状描述如下: 如果将一个委托作为函数指针从托管代码封送到非托管代码,并且在对该委托进行垃圾回收后对该函数指针发出了一个回调,则将激活 callbackOnCollectedDelegate 托管调试助手 (MDA)。 原因描述如下: 从其创建函数指针并将创建的函数指针公开给非托管代码的委托已被垃圾 阅读全文

posted @ 2017-06-29 11:12 liuslayer 阅读(2171) 评论(0) 推荐(0) 编辑

第十一章 LINQ
摘要:DataLib using System; using System.Collections.Generic; namespace Wrox.ProCSharp.LINQ { [Serializable] public class Team { public Team(string name, pa 阅读全文

posted @ 2017-06-29 09:02 liuslayer 阅读(175) 评论(0) 推荐(0) 编辑

第十章 集合
摘要:BitArraySample using System; using System.Collections; using System.Collections.Specialized; using System.Text; namespace BitArraySample { class Progr 阅读全文

posted @ 2017-06-27 16:59 liuslayer 阅读(111) 评论(0) 推荐(0) 编辑

第八章 委托、lambda表达式和事件
摘要:GetAStringDemo using System; namespace Wrox.ProCSharp.Delegates { class Program { private delegate string GetAString(); static void Main() { int x = 4 阅读全文

posted @ 2017-06-15 12:56 liuslayer 阅读(184) 评论(0) 推荐(0) 编辑

第七章 运算符和类型强制转换
摘要:SimpleCurrency using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace SimpleCurrency { class Program { struct 阅读全文

posted @ 2017-06-15 12:54 liuslayer 阅读(186) 评论(0) 推荐(0) 编辑

第六章 数组
摘要:ArraySegmentSample using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ArraySegmentSample { class Program 阅读全文

posted @ 2017-06-15 12:49 liuslayer 阅读(177) 评论(0) 推荐(0) 编辑

第五章 泛型
摘要:DocumentManager namespace Wrox.ProCSharp.Generics { public interface IDocument { string Title { get; set; } string Content { get; set; } } public clas 阅读全文

posted @ 2017-06-15 12:41 liuslayer 阅读(211) 评论(0) 推荐(0) 编辑

第四章 继承
摘要:BankAccounts using System; using Wrox.ProCSharp; using Wrox.ProCSharp.VenusBank; using Wrox.ProCSharp.JupiterBank; namespace Wrox.ProCSharp { class Ma 阅读全文

posted @ 2017-06-15 12:33 liuslayer 阅读(132) 评论(0) 推荐(0) 编辑

第三章 对象和类型
摘要:MathTest using System; namespace Wrox { class MainEntryPoint { static void Main() { // Try calling some static functions Console.WriteLine("Pi is " + 阅读全文

posted @ 2017-06-15 12:29 liuslayer 阅读(185) 评论(0) 推荐(0) 编辑

代码清单4-4 Person类的部分代码,其中包含了年龄的计算
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; namespace ConsoleApplication1 { class Program { static void Main(strin... 阅读全文

posted @ 2017-06-08 17:29 liuslayer 阅读(184) 评论(0) 推荐(0) 编辑

代码清单4-2 可空类型的装箱和拆箱行为 代码清单4-3 使用?修饰符来改写代码清单4-2
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; namespace ConsoleApplication1 { class Program { static void Main(strin... 阅读全文

posted @ 2017-06-08 15:32 liuslayer 阅读(150) 评论(0) 推荐(0) 编辑

代码清单3-12 获取泛型和已构造Type对象的各种方式
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; namespace ConsoleApplication1 { class Program { static void Main(strin... 阅读全文

posted @ 2017-06-07 15:29 liuslayer 阅读(246) 评论(0) 推荐(0) 编辑

代码清单3-10 一个完整的泛型枚举——从0枚举到9
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Collections; namespace ConsoleApplication1 { class Program { static void Main(strin... 阅读全文

posted @ 2017-06-06 18:35 liuslayer 阅读(217) 评论(0) 推荐(0) 编辑

代码清单3-6 表示一对值泛型类
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { ... 阅读全文

posted @ 2017-06-01 11:47 liuslayer 阅读(165) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示