DeleteUID Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDeleteUID()
{
   try
   {
      string pszCode = null;
      short nIndex = 0;
      LEADDICOM1.EnableMethodErrors = true;
      pszCode = "1.2.840.10008.1.2";
      //move to the selected UID
      LEADDICOM1.FindUID(pszCode);
      //delete it
      LEADDICOM1.DeleteUID();
      return;
   }
   catch
   {
      MessageBox.Show("Error");
   }
}