DeleteModule Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDeleteModule()
{
   short nRet = 0;
   LEADDICOM1.EnableMethodErrors = false;
   //move to the first module in the DataSet and delete it
   LEADDICOM1.FindIndexModule(0);
   nRet = LEADDICOM1.DeleteModule(LEADDICOM1.get_CurrentModule().Module);
   if (nRet != 0)
      MessageBox.Show("Error Deleting Module!");
   LEADDICOM1.EnableMethodErrors = true;
}