Device.GetSerialNumber Method

Retrieves the serial number of the video capture device.
Syntax:
[C#]
public bool GetSerialNumber( out string Number );
[C#]
public string GetSerialNumber();
Parameter Description
Number

Specifies the string that will receive the serial number.

Return Value:

When using the zero parameter version, the serial number is directly returned. If no serial number can be fetched, a empty string is returned.

True, if the serial number of the video capture device could be retrieved. If the video capture device does not support serial numbers, False is returned.

Limitations:

Runtime only.

Sample:

This example demonstrates how to use the GetSerialNumber method.

[C#]
string SN = ""; // Get the first video capture device. Device Dev = ICImagingControl1.Devices[0]; // Check whether a serial number can be retrieved. if( Dev.GetSerialNumber(out SN) ) { MessageBox.Show("The serial number is " + SN); } else { MessageBox.Show("The device does not have a serial number"); }
See also: Device

<< Device