zoukankan      html  css  js  c++  java
  • 集合 Enumerable Enumerator yield

    集合:

    通过索引来访问成员,--引申到索引器 的使用

     for foreach循环遍历 --引申到 IEnumerable IEnumerator(会引申到yield)

    常用的集合操作,add, insert ,remove...

    索引器:

    类比从数组Array中拿一个元素值。 int[] a=new int{10,11,12};  int item=a[1];  这里的[1] 就是索引。

    理解下面的一段: 

    public class MyColllection

    {

     private t=new Hashtable();

    public XType this[int index]

    {

    get{return t[index];}

    }

    调用时,

    MyCollection c=new MyCollection();

    XType=c[1]; 

    refer: 《.net之美》

    《c# 高级编程第8版》 

  • 相关阅读:
    运算放大器
    阻抗模型
    mysql优化
    tomcat调优
    jvm调优
    springboot使用
    deploy工程到nexus
    Spring data elasticsearch使用
    kibana使用
    笔记
  • 原文地址:https://www.cnblogs.com/breezesit/p/7735682.html
Copyright © 2011-2022 走看看