Manipulating a Data Set Using the LEADTOOLS DICOM OCX Control for C#
//LEADDicomDS is a DICOM Dataset defined outside this method
public void TestManipulatingDataSetUsingLEADTOOLSDICOMOCXControl()
{
   // The following code snippet demonstrates how to use 
 the LEADTOOLS DICOM
   // DS COM Object (ILEADDicomDS) to get the Value of the 
 Implementation Class
   // UID element of a DICOM Directory
   LTDICDIRLib.LEADDicomDir DicomDir = new LTDICDIRLib.LEADDicomDir();
   short nRetValue = 0;
   // Load a DICOMDIR File
   nRetValue = DicomDir.LoadDicomDir("C:\\Medical 
 Images\\DICOMDIR", (short)LTDICLib.DicomDataSetFlags.DS_LOAD_CLOSE);
   if (nRetValue == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
   {
      LEADDicomDS.hDicomDS 
 = DicomDir.hDicomDirDS;
      nRetValue = LEADDicomDS.FindFirstElement((int)LTDICLib.DicomDataSetTagConstants1.TAG_IMPLEMENTATION_CLASS_UID, 
 false);
      if (nRetValue == (short)LTDicomKernelLib.DicomErrorCodes.DICOM_SUCCESS)
      {
         LEADDicomDS.GetConvertValue();
         // Display the value 
 of the element
         MessageBox.Show(LEADDicomDS.get_StringValues(0));
         LEADDicomDS.StringValueCount = 0;
      }
   }
}