Enumerating Digital Signatures Example for C#

public void EnumerateSignatures(ref LTDICLib.LEADDicomDS objDS)
{
   // We will enumerate the Digital Signatures in the main Data Set
   int lSignaturesCount = 0;
   objDS.SetCurrentElement(0);
   lSignaturesCount = objDS.GetSignaturesCount();
   if (lSignaturesCount == 0)
   {
      MessageBox.Show("No Digital Signatures in the main Data Set.", "Sample");
      return;
   }
   string sMsg = null;
   if (lSignaturesCount == 1)
      sMsg = "There is 1 Digital Signature in the main Data Set. " + "Do you want to examine it?";
   else
      sMsg = "There are " + lSignaturesCount + " Digital Signatures in the main Data Set. " + "Do you want to examine them?";
   if (MessageBox.Show(sMsg, "Sample", MessageBoxButtons.YesNo) != DialogResult.Yes)
       return;
   for (int I = 0; I < lSignaturesCount; I++)
   {
      objDS.MoveSignature(I);
      // Refer to Examining a Digital Signature Example
      // for the procedure ExamineSignature
      ExamineSignature(objDS, objDS.get_CurrentElement().hElement);
      objDS.SetCurrentElement(0);
   }
}