首页 > Windows开发 > 详细

C#代码示例_集合

时间:2016-06-02 07:21:26      阅读:122      评论:0      收藏:0      [点我收藏+]

C#中数组实现为System.Array类得实例,它们只是集合类(Collection Classes)中的一种类型。

 

索引符(indexer)是一种特殊类型的属性,可以把它添加到一个类中,以提供类似于数组的访问。如:在Animal对象的Animals集合中添加一个索引符。

 1     public interface IMyInterface
 2     {
 3         void DoSomething();
 4         void DoSomethingElse();
 5     }
 6 
 7     public class MyClass : IMyInterface
 8     {
 9         void IMyInterface.DoSomething()
10         { 
11         }
12         public void DoSomeThingElse()
13         { 
14         }
15     }

 

 

C#代码示例_集合

原文:http://www.cnblogs.com/anything-but-ordinary/p/3551381.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!