zoukankan      html  css  js  c++  java
  • List<T>的ForEach方法(可以使用“语句lambda”作为其参数),如下例子:

    private void OKButton_Click(object sender, RoutedEventArgs e) {
                this.DialogResult = true;
          //  GetSelectedJZ(Shu.Items[0] as TreeViewItem);
                //选择后返回
                if (GetJZ_Event!=null) {
                //排除不是建筑的选项
                    V_FQ.Rows.Where(a =>
                    V_FQ.Value(a, "cc").ToString() == "1"
                    ).ToList().ForEach(b => {
                        if (Shu.SelectedItemsZJ.Contains(V_FQ.Value(b, "zj").ToString()))
                            Shu.SelectedItemsZJ.Remove(V_FQ.Value(b, "zj").ToString());
                    });
                    GetJZ_Event(Shu.SelectedItemsZJ);
                }
            }

     _graphicsManager.Graphics.Where<Graphic>(
                            (item) =>
                            {
                                if ((ShowAperture)item.Symbol.GetValue(PolicePictureMarkerSymbol.ShowApertureProperty) == ShowAperture.Yes)
                                {
                                    item.SetShowAperture(ShowAperture.No);
                                    return true;
                                }
                                else
                                {
                                    return false;
                                }
                            }
                        );


                        _graphicsManager.Graphics.Where<Graphic>(item => (ShowAperture)item.Symbol.GetValue(PolicePictureMarkerSymbol.ShowApertureProperty) == ShowAperture.Yes).ToList().ForEach(p => p.SetShowAperture(ShowAperture.No));

                        _graphicsManager.Graphics.Where<Graphic>(item => (ShowAperture)item.Symbol.GetValue(PolicePictureMarkerSymbol.ShowApertureProperty) == ShowAperture.Yes).ToList().ForEach((p) =>
                            {
                                p.SetShowAperture(ShowAperture.No);
                            });

  • 相关阅读:
    杭电ACM 1197
    杭电ACM 1196
    杭电ACM题目分类
    杭电ACM 1178
    指针转化(二重)
    怎么查看一个类的内存分布
    how find out what is causing Visual Studio to think each project is out of date
    MSB8013
    File mapping
    SHFileOperation 解决double-null terminated
  • 原文地址:https://www.cnblogs.com/changbaishan/p/3107436.html
Copyright © 2011-2022 走看看