DeleteIOD Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDeleteIOD()
{
   try
   {
      LEADDICOM1.EnableMethodErrors = true;
      LEADDICOM1.MoveFirstIOD(false);
      LEADDICOM1.DeleteIOD();
      return;
   }
   catch
   {
      MessageBox.Show("Error");
   }
}