心如止水

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年8月10日

摘要: 一个对象的延迟初始化意味着该对象的创建将会延迟至第一次使用该对象时。 (在本主题中,术语"延迟初始化"和"延迟实例化"是同义词。) 延迟初始化主要用于提高性能,避免浪费计算,并减少程序内存要求。 以下是最常见的方案: 有一个对象的创建开销很大,而程序可能不会使用它。 例如,假定您在内存中有一个 Customer 对象,该对象的 Orders 属性包含一个很大的 Order 对象数组,该数组需要数据... 阅读全文
posted @ 2011-08-10 17:07 cutebear 阅读(307) 评论(0) 推荐(0) 编辑

摘要: Code that runs under the control of the common language runtime (CLR) is called managed code, and code that runs outside the CLR is called unmanaged code. COM, COM+, C++ components, ActiveX components, and Microsoft Win32 API are examples of unmanaged code. .NET Framework 通过 Dllimport 属性提供了显式平台调用( P 阅读全文
posted @ 2011-08-10 15:18 cutebear 阅读(1137) 评论(0) 推荐(0) 编辑