.NET CollectionGen

转载 2004年10月04日 14:58:00

.NET CollectionGen

Wed, 4/10/02

[Note: As of 5/5/03, the functionality of CollectionGen has been sucked into Eric Smith's CodeSmith. I asked Eric to take on these features because CodeSmith does all of what CollectionGen does and more. All new feature requests/bug reports should go his way.]

CollectionGen is a Custom Tool Add-In to VS.NET 2002 & 2003 to generate type-safe collections. As it turns out, I did almost none of the work. Jon Flanders figured out how to add a custom tool. Shawn Van Ness implemented the template for type-safe collections. I just put it together.

CollectionGen is an add-on to generate code for type-safe collections until we have templates in C# (likely) and VB (unlikely). The benefit of a type-safe collection, of course, is that you can use it without having to cast items to and from objects. Also, Shawn has been very careful to implement a collection class that is very efficient for both reference types and value types.

Once you've setup it up and defined your collections in a collection definition file in your project, you'll have type-safe collection classes generated as part of your design-process, as shown here:


Figure 1: collections.xml collection definition file



Figure 2: collections.xml and generated collection.cs implementation file



Figure 3: CollectionGen custom tool add-in associated with the collections.xml file



Figure 4: Generate type-safe collection code


Also, Atif Aziz used some of my custom tool code and built a generic VS.NET code generator shim that allows you to build a code generator that plugs into VS.NET by implementing a single method.

简析.NET Core 以及与 .NET Framework的关系

http://www.cnblogs.com/vipyoumay/p/5603928.html *************************************************...
  • zhao1949
  • zhao1949
  • 2016年06月23日 09:03
  • 10795

.net 文件操作类(转载)

using System; using System.Collections.Generic; using System.Text; using System.IO; #endregi...
  • anfeng_8379
  • anfeng_8379
  • 2012年01月13日 11:11
  • 4352


  • yzupope
  • yzupope
  • 2012年07月11日 13:50
  • 8190


好久以前的代码了,看见csdn上有人提问,就整理一下吧 测试发现一年半以前,vc创建使用.net控件还是很耗时的,现在我笔记本上都已经感觉不到延迟了。 注:转载的人请厚道,起码要有个ref...
  • shyandsy
  • shyandsy
  • 2011年12月05日 02:32
  • 3856


        /*-------------------C#数组的学习------------------*/        //==================一维数组         //n...
  • ly4885806
  • ly4885806
  • 2008年10月16日 16:28
  • 7727


  • tongdoudpj
  • tongdoudpj
  • 2007年12月11日 12:49
  • 5432


  • chenfanglincfl
  • chenfanglincfl
  • 2014年07月12日 23:24
  • 1926

.net 基础知识(面试用)

C# .NET 基本概念1. private、 protected、 public、 internal 修饰符的访问权限。   private : 私有成员, 在类的内部才可以访问。    prote...
  • loveheye
  • loveheye
  • 2010年08月12日 10:01
  • 5474


上篇文章《学.Net还是学Java?》中我阐述了不同语言学习的不同点,如果你开始决定学习.Net了,那么你的下一个问题很可能是“学了.Net我能做什么?”。 .Net目前主要的开发方向是:Web开发...
  • kiqiNie
  • kiqiNie
  • 2012年11月02日 14:15
  • 1118


  • yanghua_kobe
  • yanghua_kobe
  • 2011年11月11日 23:04
  • 15931
您举报文章:.NET CollectionGen