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);
                            });

  • 相关阅读:
    Spring源码构建 报错exception during working with external system: java.lang.AssertionError
    EDI_了解
    前端-正则表达式-收集
    Spring Boot必备知识点
    SSM开发在线考试系统-完整版+视频教程
    基于WEB的车票预订信息系统设计
    IDEA开发Maven构建SSM项目遇到的坑,action
    Linux教程-修炼
    2020年Java 成长路线-flag
    Redis教程
  • 原文地址:https://www.cnblogs.com/changbaishan/p/3107436.html
Copyright © 2011-2022 走看看