Exemple #1
0
 internal static CILLabel GetLabel(SCG.List<CILLabel> labs, uint targetOffset)
 {
     CILLabel lab;
       int i = 0;
       while ((i < labs.Count) && (((CILLabel)labs[i]).offset < targetOffset)) i++;
       if (i < labs.Count) {
     if (((CILLabel)labs[i]).offset == targetOffset) // existing label
       lab = (CILLabel)labs[i];
     else {
       lab = new CILLabel(targetOffset);
       labs.Insert(i, lab);
     }
       }
       else {
     lab = new CILLabel(targetOffset);
     labs.Add(lab);
       }
       return lab;
 }