当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: Creating Collection Clas
 

 

 ·unicodetoutf8    »显示摘要«
    摘要: convertunicodetoutf8(const wchar *wstrin, byte *buff,int vlen) { assert(wstrin); int wlen=wcslen(wstrin); int i=0; #define putchar(a) buff[i++]=(byte)a; for(int j=0;(dword)j<wcslen(wst......
    摘要: .net正式版中的一些bug及其解决方案 (原创) 作者: 飞刀 (1)session的问题 问题: 在我的windows.net 3604 + .net framework正式版的编程环境中,.net下的session总是有问题,比如我在a程序下设置了一个session字典,这个session将会在b程序下读取,现在的情况就是我在b程序读取这个session时,第一次能够......


CreatingCollectionClassesinC#
creating collection classes in c# introduction collection classes are used frequently in .net. for example, classes like arraylist, namevaluecollection, hashtable are collection classes. one peculiar thing of collection classes is that they can be used in foreach(...) loop in c#. vb.net has similar construct for...each. your custom classes can also be iterated in this way if you implement certain interfaces. in this article we will see how to code collection classes using c#. sample class for our example we will assume that we need some data structure in whch we will store list of book titles. we should be able to add, remove and iterate through the set of book titles. we will create a collection class called books that will stire these titles. before going in to the details of creating collection class let us see the books class in its most basic form. namespace collectionclass { class books {         private arraylist m_booktitles;         public books()         {                m_booktitles=new arraylist();         }         public void add(string booktitle)         {                m_booktitles.add(booktitle);         }
...   下一页
 ·microsoft.net框架faq续    »显示摘要«
    摘要: 垃圾回收什么是垃圾回收? 垃圾回收是一种机制,它使计算机能够检测到对象何时不能再被访问。然后它自动释放该对象所使用的内存(同时调用由用户编写的称为“终结程序”的清理例程)。有些垃圾回收器(如 .net 使用的垃圾回收器)压缩内存,从而减小程序的工作集。 返回到顶部非确定性的垃圾回收如何影响代码? 对于大多数程序员而言,拥有垃圾回收器(并使用垃圾回收对象)意味着即使使用复杂的数据......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE