当前位置: 首页>>代码示例>>C#>>正文


C# Boolean.Clone方法代码示例

本文整理汇总了C#中System.Boolean.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# Boolean.Clone方法的具体用法?C# Boolean.Clone怎么用?C# Boolean.Clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Boolean的用法示例。


在下文中一共展示了Boolean.Clone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddResult

            public void AddResult(ResultData r)
            {
                Boolean match = false;
                int indx = -1;
                foreach (MainResults MaRe in results)
                {
                    //match = (MaRe.Latitude == r.Latitude && MaRe.Longitude == r.Longitude);
                    match = (MaRe.OrganizationLocationID == r.OrganizationLocationID);
                    if (match)
                    {
                        indx = results.IndexOf(MaRe);
                        break;
                    }
                }
                if (!match)
                {
                    MainResults mr = new MainResults();
                    mr.TaxID = new String[] { r.TaxID };
                    mr.NPI = new String[] { r.NPI };
                    mr.PracticeName = r.PracticeName;
                    mr.ProviderName = new String[] { r.ProviderName };
                    mr.PracticeRangeMin = String.Format("{0:c0}", decimal.Parse(r.RangeMin));
                    mr.RangeMin = new String[] { r.RangeMin };
                    mr.PracticeRangeMax = String.Format("{0:c0}", decimal.Parse(r.RangeMax));
                    mr.RangeMax = new String[] { r.RangeMax };
                    mr.PracticeYourCostMin = String.Format("{0:c0}", decimal.Parse(r.YourCostMin));
                    mr.YourCostMin = new String[] { r.YourCostMin };
                    mr.PracticeYourCostMax = String.Format("{0:c0}", decimal.Parse(r.YourCostMax));
                    mr.YourCostMax = new String[] { r.YourCostMax };
                    mr.Latitude = r.Latitude;
                    mr.Longitude = r.Longitude;
                    mr.OrganizationLocationID = r.OrganizationLocationID;
                    mr.LocationAddress1 = r.LocationAddress1;
                    mr.LocationCity = r.LocationCity;
                    mr.LocationState = r.LocationState;
                    mr.LocationZip = r.LocationZip;
                    mr.Distance = r.Distance;
                    mr.NumericDistance = r.NumericDistance;
                    mr.PracticeFairPrice = r.FairPrice;
                    mr.FairPrice = new Boolean[] { r.FairPrice };
                    mr.HGRecognized = new Int32[] { r.HGRecognized };
                    switch (r.HGRecognized)
                    {
                        case -1:
                            mr.PracticeHGRecognized = "N/A";
                            break;
                        case 0:
                            mr.PracticeHGRecognized = "0/1 Physicians";
                            break;
                        case 1:
                            mr.PracticeHGRecognized = "1/1 Physicians";
                            break;
                        default:
                            mr.PracticeHGRecognized = "N/A";
                            break;
                    }
                    mr.PracticeAvgRating = r.HGOverallRating;
                    mr.HGOverallRating = new Double[] { r.HGOverallRating };
                    mr.HGPatientCount = new int[] { r.HGPatientCount };
                    results.Add(mr);
                }
                else
                {
                    MainResults mr = results[indx];

                    String[] s = new String[mr.TaxID.Length + 1];
                    mr.TaxID.CopyTo(s, 0);
                    s[s.Length - 1] = r.TaxID;
                    mr.TaxID = (String[])s.Clone();
                    mr.NPI.CopyTo(s, 0);
                    s[s.Length - 1] = r.NPI;
                    mr.NPI = (String[])s.Clone();
                    mr.ProviderName.CopyTo(s, 0);
                    s[s.Length - 1] = r.ProviderName;
                    mr.ProviderName = (String[])s.Clone();

                    mr.RangeMin.CopyTo(s, 0);
                    s[s.Length - 1] = r.RangeMin;
                    mr.RangeMin = (String[])s.Clone();
                    mr.PracticeRangeMin = String.Format("{0:c0}", ((double.Parse(mr.PracticeRangeMin.Replace("$", "")) + double.Parse(r.RangeMin)) / 2.0));
                    mr.RangeMax.CopyTo(s, 0);
                    s[s.Length - 1] = r.RangeMax;
                    mr.RangeMax = (String[])s.Clone();
                    mr.PracticeRangeMax = String.Format("{0:c0}", ((double.Parse(mr.PracticeRangeMax.Replace("$", "")) + double.Parse(r.RangeMax)) / 2.0));

                    mr.YourCostMin.CopyTo(s, 0);
                    s[s.Length - 1] = r.YourCostMin;
                    mr.YourCostMin = (String[])s.Clone();
                    mr.PracticeYourCostMin = String.Format("{0:c0}", ((double.Parse(mr.PracticeYourCostMin.Replace("$", "")) + double.Parse(r.YourCostMin)) / 2.0));
                    mr.YourCostMax.CopyTo(s, 0);
                    s[s.Length - 1] = r.YourCostMax;
                    mr.YourCostMax = (String[])s.Clone();
                    mr.PracticeYourCostMax = String.Format("{0:c0}", ((double.Parse(mr.PracticeYourCostMax.Replace("$", "")) + double.Parse(r.YourCostMax)) / 2.0));

                    Boolean[] b = new Boolean[mr.FairPrice.Length + 1];
                    mr.FairPrice.CopyTo(b, 0);
                    b[b.Length - 1] = r.FairPrice;
                    mr.FairPrice = (Boolean[])b.Clone();
                    if (!mr.PracticeFairPrice && r.FairPrice) { mr.PracticeFairPrice = r.FairPrice; }

//.........这里部分代码省略.........
开发者ID:reydavid47,项目名称:GITHUB,代码行数:101,代码来源:Handlers.cs


注:本文中的System.Boolean.Clone方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。