Gets the value of a string property of the board.

Namespace:  Quanser.Hardware
Assembly:  Quanser.Hardware.Hil (in Quanser.Hardware.Hil.dll)

Syntax

Visual Basic (Declaration)
Public Function GetStringProperty ( _
	property_code As Hil..::.StringProperty _
) As String
C#
public string GetStringProperty(
	Hil..::.StringProperty property_code
)
Visual C++
public:
String^ GetStringProperty(
	Hil..::.StringProperty property_code
)
JavaScript
function getStringProperty(property_code);

Parameters

property_code
Type: Quanser.Hardware..::.Hil..::.StringProperty

The property number of the property to be retrieved. For a list of the standard string properties refer to the Hil..::.StringProperty enumeration. Boards may have custom properties as well.

Select a board type from the list for board-specific details: .

Remarks

The GetStringProperty method gets the value of a single string property of the board. String properties include quantities such as the manufacturer, product or model name, serial number, etc. This method can only retrieve the value of one string property.

Examples

This sample illustrates how to use the GetStringProperty(Hil..::.StringProperty) method. It reads the manufacturer of the board.
C# Copy Code
String manufacturer;

manufacturer = board.GetStringProperty(Hil.StringProperty.Manufacturer);
Console.WriteLine("Manufacturer: " + manufacturer);
Visual Basic Copy Code
Dim manufacturer As String

manufacturer = board.GetStringProperty(Hil.StringProperty.Manufacturer)
Console.WriteLine("Manufacturer: " & manufacturer)
Visual C++ Copy Code
String^ manufacturer;

manufacturer = board->GetStringProperty(Hil::StringProperty::Manufacturer);
Console::WriteLine(L"Manufacturer: " + manufacturer);

Exceptions

ExceptionCondition
Quanser.Hardware..::.HilException If the property value cannot be retrieved then an exception is thrown. This situtation typically arises when the property is not supported by the board.

See Also