zoukankan      html  css  js  c++  java
  • C# Dictionary 字典用法 记录

    Dictionary 使用

    using System.Collections.Generic;

    Create Dictionary

    Dictionary<decimal, int> dicCIUType = new Dictionary<decimal, int>();

    Add to Dictionary

    dicCIUType.Add(id, Type);

    Search in Dictionary

                foreach (KeyValuePair<decimal, int> kvp in dic)

                {

                    if (kvp.Key == id)

                    {

                        continue;

                    }

                    if (kvp.Value == Type)

                    {

                        return false;

                    }

                }

  • 相关阅读:
    prayer OJ M
    51nod1295
    纪念第一次ak。。。
    noip2007-4
    51nod1344
    51nod1079
    51nod1537
    51nod1269Devu and Flowers
    python基本数据类型之列表list
    Python基本数据类型
  • 原文地址:https://www.cnblogs.com/mantian/p/2844489.html
Copyright © 2011-2022 走看看