IFeatureSupport.IsPresent 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 기능을 시스템에서 현재 사용할 수 있는지 여부를 확인합니다.
오버로드
| Name | Description |
|---|---|
| IsPresent(Object) |
지정된 기능의 버전을 시스템에서 현재 사용할 수 있는지 여부를 확인합니다. |
| IsPresent(Object, Version) |
지정된 기능의 지정된 버전 또는 최신 버전을 시스템에서 현재 사용할 수 있는지 여부를 확인합니다. |
IsPresent(Object)
- Source:
- IFeatureSupport.cs
- Source:
- IFeatureSupport.cs
- Source:
- IFeatureSupport.cs
- Source:
- IFeatureSupport.cs
- Source:
- IFeatureSupport.cs
지정된 기능의 버전을 시스템에서 현재 사용할 수 있는지 여부를 확인합니다.
public:
bool IsPresent(System::Object ^ feature);
public bool IsPresent(object feature);
abstract member IsPresent : obj -> bool
Public Function IsPresent (feature As Object) As Boolean
매개 변수
- feature
- Object
찾을 기능입니다.
반품
예제
다음 예제에서는 기능에 대한 구현 OSFeature 및 쿼리를 IFeatureSupport 사용합니다LayeredWindows. 버전이 있는지 확인 null하여 기능이 있는지 확인합니다. 결과는 텍스트 상자에 표시됩니다. 이 코드는 양식에 textBox1 만들어지고 배치되었다고 가정합니다.
private:
void LayeredWindows()
{
// Gets the version of the layered windows feature.
Version^ myVersion = OSFeature::Feature->GetVersionPresent(
OSFeature::LayeredWindows );
// Prints whether the feature is available.
if ( myVersion != nullptr )
{
textBox1->Text = "Layered windows feature is installed.\n";
}
else
{
textBox1->Text = "Layered windows feature is not installed.\n";
}
// This is an alternate way to check whether a feature is present.
if ( OSFeature::Feature->IsPresent( OSFeature::LayeredWindows ) )
{
textBox1->Text = String::Concat( textBox1->Text,
"Again, layered windows feature is installed." );
}
else
{
textBox1->Text = String::Concat( textBox1->Text,
"Again, layered windows feature is not installed." );
}
}
private void LayeredWindows() {
// Gets the version of the layered windows feature.
Version myVersion = OSFeature.Feature.GetVersionPresent(OSFeature.LayeredWindows);
// Prints whether the feature is available.
if (myVersion != null)
textBox1.Text = "Layered windows feature is installed." + '\n';
else
textBox1.Text = "Layered windows feature is not installed." + '\n';
// This is an alternate way to check whether a feature is present.
if (OSFeature.Feature.IsPresent(OSFeature.LayeredWindows))
textBox1.Text += "Again, layered windows feature is installed.";
else
textBox1.Text += "Again, layered windows feature is not installed.";
}
Private Sub LayeredWindows()
' Gets the version of the layered windows feature.
Dim myVersion As Version = _
OSFeature.Feature.GetVersionPresent(OSFeature.LayeredWindows)
' Prints whether the feature is available.
If (myVersion IsNot Nothing) Then
textBox1.Text = "Layered windows feature is installed." & _
ControlChars.CrLf
Else
textBox1.Text = "Layered windows feature is not installed." & _
ControlChars.CrLf
End If
'This is an alternate way to check whether a feature is present.
If OSFeature.Feature.IsPresent(OSFeature.LayeredWindows) Then
textBox1.Text &= "Again, layered windows feature is installed."
Else
textBox1.Text &= "Again, layered windows feature is not installed."
End If
End Sub
추가 정보
적용 대상
IsPresent(Object, Version)
- Source:
- IFeatureSupport.cs
- Source:
- IFeatureSupport.cs
- Source:
- IFeatureSupport.cs
- Source:
- IFeatureSupport.cs
- Source:
- IFeatureSupport.cs
지정된 기능의 지정된 버전 또는 최신 버전을 시스템에서 현재 사용할 수 있는지 여부를 확인합니다.
public:
bool IsPresent(System::Object ^ feature, Version ^ minimumVersion);
public bool IsPresent(object feature, Version minimumVersion);
abstract member IsPresent : obj * Version -> bool
Public Function IsPresent (feature As Object, minimumVersion As Version) As Boolean
매개 변수
- feature
- Object
찾을 기능입니다.
반품
true요청된 기능 버전이 있으면 이고, 그렇지 않으면 . false
예제
다음 예제에서는 기능에 대한 구현 OSFeature 및 쿼리를 IFeatureSupport 사용합니다LayeredWindows. 버전이 있는지 확인 null하여 기능이 있는지 확인합니다. 결과는 텍스트 상자에 표시됩니다. 이 코드는 양식에 textBox1 만들어지고 배치되었다고 가정합니다.
private:
void LayeredWindows()
{
// Gets the version of the layered windows feature.
Version^ myVersion = OSFeature::Feature->GetVersionPresent(
OSFeature::LayeredWindows );
// Prints whether the feature is available.
if ( myVersion != nullptr )
{
textBox1->Text = "Layered windows feature is installed.\n";
}
else
{
textBox1->Text = "Layered windows feature is not installed.\n";
}
// This is an alternate way to check whether a feature is present.
if ( OSFeature::Feature->IsPresent( OSFeature::LayeredWindows ) )
{
textBox1->Text = String::Concat( textBox1->Text,
"Again, layered windows feature is installed." );
}
else
{
textBox1->Text = String::Concat( textBox1->Text,
"Again, layered windows feature is not installed." );
}
}
private void LayeredWindows() {
// Gets the version of the layered windows feature.
Version myVersion = OSFeature.Feature.GetVersionPresent(OSFeature.LayeredWindows);
// Prints whether the feature is available.
if (myVersion != null)
textBox1.Text = "Layered windows feature is installed." + '\n';
else
textBox1.Text = "Layered windows feature is not installed." + '\n';
// This is an alternate way to check whether a feature is present.
if (OSFeature.Feature.IsPresent(OSFeature.LayeredWindows))
textBox1.Text += "Again, layered windows feature is installed.";
else
textBox1.Text += "Again, layered windows feature is not installed.";
}
Private Sub LayeredWindows()
' Gets the version of the layered windows feature.
Dim myVersion As Version = _
OSFeature.Feature.GetVersionPresent(OSFeature.LayeredWindows)
' Prints whether the feature is available.
If (myVersion IsNot Nothing) Then
textBox1.Text = "Layered windows feature is installed." & _
ControlChars.CrLf
Else
textBox1.Text = "Layered windows feature is not installed." & _
ControlChars.CrLf
End If
'This is an alternate way to check whether a feature is present.
If OSFeature.Feature.IsPresent(OSFeature.LayeredWindows) Then
textBox1.Text &= "Again, layered windows feature is installed."
Else
textBox1.Text &= "Again, layered windows feature is not installed."
End If
End Sub