DeleteElement Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestDeleteElement( )
{
   short nRet = 0;
   LEADDICOM1.EnableMethodErrors = false;
   LEADDICOM1.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_STUDY_DATE, false);
   nRet = LEADDICOM1.DeleteElement();
   LEADDICOM1.EnableMethodErrors = true;
   if (nRet != 0)
      MessageBox.Show("Error Deleting Element!");
}