NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

FeatureSupport.IsPresent

Determines whether the specified feature is currently available on the system.

Overload List

Determines whether any version of the specified feature is currently available on the system.

[Visual Basic] Overloads Overridable Public Function IsPresent(Object) As Boolean
[C#] public virtual bool IsPresent(Object);
[C++] public: virtual bool IsPresent(Object*);
[JScript] public function IsPresent(Object) : Boolean;

Determines whether the specified or newer version of the specified feature is currently available on the system.

[Visual Basic] Overloads Overridable Public Function IsPresent(Object, Version) As Boolean
[C#] public virtual bool IsPresent(Object, Version);
[C++] public: virtual bool IsPresent(Object*, Version);
[JScript] public function IsPresent(Object, Version) : Boolean;

Determines whether the specified or newer version of the specified feature is currently available on the system.

[Visual Basic] Overloads Public Shared Function IsPresent(String, String, Version) As Boolean
[C#] public static bool IsPresent(String, String, Version);
[C++] public: static bool IsPresent(String*, String*, Version);
[JScript] public static function IsPresent(String, String, Version) : Boolean;

Determines whether any version of the specified feature is currently available on the system.

[Visual Basic] Overloads Public Shared Function IsPresent(String, String) As Boolean
[C#] public static bool IsPresent(String, String);
[C++] public: static bool IsPresent(String*, String*);
[JScript] public static function IsPresent(String, String) : Boolean;

Example [Visual Basic]

The following example determines whether the number of outstanding device contexts on the current system is limited to five and displays the result in a label. This code assumes Label1 has been placed on the form. IsPresent is called, with OSFeature specifying the class to query for feature information, and DEVICECONTEXT_LIMITED as the feature to look for.

Note   This example shows how to use one of the overloaded versions of IsPresent. For other examples that may be available, see the individual overload topics.

[Visual Basic]

Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
   ' Determine whether the device context limited feature is present and display the results. 
   Label1.Text = FeatureSupport.IsPresent("System.WinForms.OSFeature", "System.Winforms.OSFeature.DEVICECONTEXT_LIMITED")
End Sub

See Also

FeatureSupport Class | FeatureSupport Members | System.WinForms Namespace