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 (String, String)

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

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

Parameters

featureClassName
The name of the class to query for information about the specified feature.
featureConstName
The name of the feature to look for.

Return Value

true if the specified feature is present; false if the specified feature is not present or if the product containing the feature is not installed.

Remarks

The specified featureClassName must implement IFeatureSupport. To determine the name of the class to query for feature information, see documentation for the product containing the feature.

To determine the featureConstName, see documentation for the product containing the feature.

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.

[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 | FeatureSupport.IsPresent Overload List | GetVersionPresent