FeatureSupport.GetVersionPresent 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
시스템에서 사용할 수 있는 지정된 기능의 버전을 가져옵니다.
오버로드
| Name | Description |
|---|---|
| GetVersionPresent(Object) |
파생 클래스에서 재정의되는 경우 시스템에서 사용할 수 있는 지정된 기능의 버전을 가져옵니다. |
| GetVersionPresent(String, String) |
시스템에서 사용할 수 있는 지정된 기능의 버전을 가져옵니다. |
GetVersionPresent(Object)
- Source:
- FeatureSupport.cs
- Source:
- FeatureSupport.cs
- Source:
- FeatureSupport.cs
- Source:
- FeatureSupport.cs
- Source:
- FeatureSupport.cs
파생 클래스에서 재정의되는 경우 시스템에서 사용할 수 있는 지정된 기능의 버전을 가져옵니다.
public:
abstract Version ^ GetVersionPresent(System::Object ^ feature);
public abstract Version GetVersionPresent(object feature);
public abstract Version? GetVersionPresent(object feature);
abstract member GetVersionPresent : obj -> Version
Public MustOverride Function GetVersionPresent (feature As Object) As Version
매개 변수
- feature
- Object
버전이 요청된 기능입니다.
반품
Version 시스템에서 사용할 수 있는 지정된 기능의 버전 번호를 나타내거나 null 기능이 설치되지 않은 경우를 나타냅니다.
구현
예제
다음 코드 예제에서는 기능에 대한 구현 OSFeature 및 쿼리를 FeatureSupport 사용합니다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
설명
버전 번호는 주, 부 및 빌드의 세 부분으로 구성됩니다. 일반적으로 버전 번호는 "major number.minor number.build number"로 표시됩니다.
구현자 참고
상속 FeatureSupport하는 경우 이 메서드를 재정의해야 합니다. 이 메서드를 재정의할 때 매개 변수에 feature 사용하는 클래스가 메서드에서 이 매개 변수 IsPresent(String, String) 에 사용되는 클래스와 같은지 확인합니다. 두 feature 매개 변수가 다른 경우 재정의해야 합니다 IsPresent(String, String).
이 메서드의 구현을 참조 GetVersionPresent(Object) 하세요.
추가 정보
적용 대상
GetVersionPresent(String, String)
- Source:
- FeatureSupport.cs
- Source:
- FeatureSupport.cs
- Source:
- FeatureSupport.cs
- Source:
- FeatureSupport.cs
- Source:
- FeatureSupport.cs
시스템에서 사용할 수 있는 지정된 기능의 버전을 가져옵니다.
public:
static Version ^ GetVersionPresent(System::String ^ featureClassName, System::String ^ featureConstName);
public static Version GetVersionPresent(string featureClassName, string featureConstName);
public static Version? GetVersionPresent(string featureClassName, string featureConstName);
static member GetVersionPresent : string * string -> Version
Public Shared Function GetVersionPresent (featureClassName As String, featureConstName As String) As Version
매개 변수
- featureClassName
- String
지정된 기능에 대한 정보를 쿼리할 클래스의 정규화된 이름입니다. 이 클래스는 인터페이스를 IFeatureSupport 구현하거나 이 인터페이스를 구현하는 클래스에서 상속해야 합니다.
- featureConstName
- String
찾을 기능의 정규화된 이름입니다.
반품
시스템에서 사용할 수 있는 지정된 기능의 버전 번호 또는 Version 기능이 설치되지 않은 경우의 A null 입니다.
설명
버전 번호는 주, 부 및 빌드의 세 부분으로 구성됩니다. 일반적으로 버전 번호는 "major number.minor number.build number"로 표시됩니다.
전달할 featureClassName 이름 및 featureConstName 매개 변수를 확인하려면 기능이 포함된 제품에 대한 설명서를 참조하세요.