本文整理汇总了C#中System.Int32.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# Int32.Clone方法的具体用法?C# Int32.Clone怎么用?C# Int32.Clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Int32
的用法示例。
在下文中一共展示了Int32.Clone方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PermutationChromosome
/// <summary>
/// Konstruktor. Inicjalizacja na podstawie zadanej permutacji.
/// </summary>
/// <param name="data">Allele.</param>
public PermutationChromosome(Int32[] data)
{
Debug.Assert(data.Length > 3);
Age = 0;
Evaluation = Double.NaN;
Data = (Int32[])data.Clone();
}
示例2: 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; }
//.........这里部分代码省略.........