MobileCapabilities.HasCapability Method
Assembly: System.Web.Mobile (in system.web.mobile.dll)
public boolean HasCapability ( String delegateName, String optionalParameter )
public function HasCapability ( delegateName : String, optionalParameter : String ) : boolean
Not applicable.
Parameters
- delegateName
The device evaluation method, property name, or item in the capabilities collection.
- optionalParameter
The optional argument.
Return Value
true if the device has the specified capability; otherwise, false.| Exception type | Condition |
|---|---|
|
A capabilityName parameter is not found as a device-filter name specified in the configuration file, as a MobileCapabilities property, or as an item in the MobileCapabilities Item collection. | |
|
delegateName is a null reference (Nothing in Visual Basic) or empty. |
Applications can use the HasCapability method programmatically when they gather device-specific information. If the capabilityName parameter specifies a device evaluation method, the optionalArgument parameter is passed to this method. If the capabilityName parameter specifies a property name or item in the capabilities dictionary, the HasCapability method checks whether the property or item is equal to the optionalArgument parameter.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.