zoukankan      html  css  js  c++  java
  • Dictionary的遍历与赋值

    // /<summary>
    /// 存放录入的支付金额
    /// </summary>
    private Dictionary<Guid,decimal> dictPayment;

    public Dictionary<Guid,decimal> DictPayment
    {
      get { return dictPayment; }
      set
      {
        dictPayment = value;
        this.RaisePropertyChanged("DictPayment");
      }
    }

    将Dictionary的键存放在一个List或一个ArrayList(或其他?)都可以,可以通过遍历这个List来获取Dictionary的键,根据键就可以得到对应的值。

    #region 获取输入值并存入DictPayment
    List<Guid> list = this.DictPayment.Keys.ToList();
    for (int i = 0; i < list.Count; i++)
    {
      if (list[i] == p.TypeID)
      {
        this.DictPayment[list[i]] = p.Money;
      }
    }
    #endregion

  • 相关阅读:
    FirstThunk
    FirstThunk
    输入地址表(IAT)
    PE文件讲解
    PE格式详细讲解
    pe结构讲解
    PE格式详细讲解
    输入地址表(IAT)
    pe结构讲解
    zindex可以使用负值
  • 原文地址:https://www.cnblogs.com/gnsds/p/3664760.html
Copyright © 2011-2022 走看看