In The Hand LtdIn The Hand
GetValue Method (property)
NamespacesInTheHand.WindowsMobile.StatusSystemStateGetValue(SystemProperty)
.NET Components for Mobility
Get's the value of a system property.
Declaration Syntax
C#Visual Basic
public static Object GetValue(
	SystemProperty property
)
Public Shared Function GetValue ( _
	property As SystemProperty _
) As Object
Parameters
property (SystemProperty)
System property to retrieve the value of.
Return Value
either an int, string, or byte[] representing the value of the property. You can use the 'is' operator to determine which type it is.
Examples
The following example shows how to query the battery strength of the device:
CopyC
BatteryLevel batteryLevel = SystemState.PowerBatteryStrength;
CopyVB.NET
Dim batteryLevel As BatteryLevel = SystemState.PowerBatteryStrength
Examples
The following example shows how to query a system state via a variable:
CopyC#
SystemProperty property = SystemProperty.PowerBatteryStrength;
BatteryLevel batteryLevel = (BatteryLevel)SystemState.GetValue(property);
CopyVB.NET
Dim property As SystemProperty = SystemProperty.PowerBatteryStrength
Dim batteryLevel As BatteryLevel = CType(SystemState.GetValue(property), BatteryLevel)

Assembly: InTheHand.WindowsMobile.Status (Module: InTheHand.WindowsMobile.Status) Version: 7.0.0.0