GetInfoDS Example for C#

//LEADDICOM1 is a DICOM Dataset defined outside this method
private void TestGetInfoDS()
{
   try
   {
      string szClass = null;
      string szFlags = null;
      LEADDICOM1.EnableMethodErrors = true;
      LEADDICOM1.GetInfoDS();
      LEADDICOM1.FindClassIOD(LEADDICOM1.InfoClass);
      szClass = LEADDICOM1.get_CurrentIOD().Name;
      szFlags = System.Convert.ToString(LEADDICOM1.InfoFlags, 16).ToUpper();
      MessageBox.Show("Class: " + szClass + '\n' + '\r' + "Flags: " + szFlags);
      return;
   }
   catch
   {
      MessageBox.Show("Error");
   }
}