想要破解代码并从其他行c#代码继续它

时间:2016-06-11 18:53:50

标签: c#

我想在循环外的某个点处破解代码,并希望从嵌套循环内的点或线继续它。我尝试了“goto”选项,但它给了我语法错误。

if (PopulationID == 1)
{
    AlPopulation = ClsChm.ProduceInitialChrPopulation(PopulationID);
}
else
{
    ///break at this point
    goto end;
}

try
{
    for (GenerationIndex = PopulationID ; GenerationIndex <= NumberOfGenerations; GenerationIndex++) //Start of Generation Loop
    {
        PopulationID = GenerationIndex;
        AlFitness.Clear();
        for (ChromosomeID = 0; ChromosomeID <= (NumberOfOffsprings ); ChromosomeID++)   // Start of Chromosome Loop
        {
            Fitness = 0;
            Altemp = (int[])AlPopulation[ChromosomeID];

            for (NumOfSample = 0; NumOfSample  < 100 ; NumOfSample++ )            // start of Sample loop
            {
                ///continue at this point
                end:
            }
        }
    }
}
...

0 个答案:

没有答案