NetReceiveData Example for C#

//This example uses the predefined variable “List2” of type “ListBox” from “.NET Framework”.
//LEADDICOM1 is a DICOM Dataset defined outside this method
private void LEADDICOMNet1_NetReceiveData(int hNet, short nID, int hDicomCS, int hDicomDS)
{
   //data was received
   List2.Items.Add("Data was received - " + " ID: " + System.Convert.ToString(nID));
   if (hDicomDS == 0)
      List2.Items.Add("Data is a command set only!");
   else
   {
      //save the data set to disk
      List2.Items.Add("Data includes a data set - saved to disk!");
      LEADDICOM1.SaveExtDS(hDicomDS, "c:\\temp\\test.dic", 0);
   }
}