FindModuleIOD Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestFindModuleIOD(object eventSender, System.EventArgs eventArgs)
{
   try
   {
      string szPrompt = null;
      LEADDICOM1.EnableMethodErrors = true;
      //Find a Module
      LEADDICOM1.FindModuleIOD((int)LTDICLib.DicomClassConstants.DICOM_CLASS_CR_IMAGE_STORAGE, (int)LTDICLib.DicomModuleConstants.DICOM_MODULE_BIPLANE_IMAGE);
      MessageBox.Show(LEADDICOM1.get_CurrentIOD().Name);
      LEADDICOM1.SetIODName("New IOD Name #1");
      LEADDICOM1.SetIODDescription("New IOD Description #1");
      szPrompt = "Name: " + LEADDICOM1.get_CurrentIOD().Name + "\r";
      szPrompt = szPrompt + "Desc: " + LEADDICOM1.get_CurrentIOD().Description;
      MessageBox.Show(szPrompt);
      //Find a Class LEADDICOM1.FindClassIOD((int)LTDICLib.DicomClassConstants.DICOM_CLASS_PRINT_QUEUE);
      MessageBox.Show(LEADDICOM1.get_CurrentIOD().Name);
      LEADDICOM1.SetIODName("New IOD Name #2");
      LEADDICOM1.SetIODDescription("New IOD Description #2");
      szPrompt = "Name: " + LEADDICOM1.get_CurrentIOD().Name + "\r";
      szPrompt = szPrompt + "Desc: " + LEADDICOM1.get_CurrentIOD().Description;
      MessageBox.Show(szPrompt);
      return;
   }
   catch
   {
      MessageBox.Show("Error");
   }
}