FeatureSupport.GetVersionPresent 메서드

정의

시스템에서 사용할 수 있는 지정된 기능의 버전을 가져옵니다.

오버로드

GetVersionPresent(Object)

파생 클래스에서 재정의하는 경우 시스템에서 사용할 수 있는 지정된 기능의 버전을 가져옵니다.

GetVersionPresent(String, String)

시스템에서 사용할 수 있는 지정된 기능의 버전을 가져옵니다.

GetVersionPresent(Object)

파생 클래스에서 재정의하는 경우 시스템에서 사용할 수 있는 지정된 기능의 버전을 가져옵니다.

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

설명

버전 번호의 세 부분으로 구성 됩니다: 주, 부 및 빌드. 일반적으로 버전 번호를 "주요 버전 빌드 번호"로 표시 됩니다.

구현자 참고

에서 FeatureSupport상속하는 경우 이 메서드를 재정의해야 합니다. 이 메서드를 재정의하는 경우 매개 변수에 사용하는 클래스가 메서드에서 이 매개 변수 IsPresent(String, String)feature 사용되는 클래스와 동일한지 검사. 두 feature 매개 변수가 다른 경우 도 재정 IsPresent(String, String)의해야 합니다.

이 메서드의 구현은 를 참조하세요 GetVersionPresent(Object) .

추가 정보

적용 대상

GetVersionPresent(String, String)

시스템에서 사용할 수 있는 지정된 기능의 버전을 가져옵니다.

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입니다. 기능이 설치되어 있지 않으면 null입니다.

설명

버전 번호의 세 부분으로 구성 됩니다: 주, 부 및 빌드. 일반적으로 버전 번호를 "주요 버전 빌드 번호"로 표시 됩니다.

전달할 이름을 결정 하는 기능을 포함 하는 제품 설명서를 참조 합니다 featureClassName 하며 featureConstName 매개 변수입니다.

추가 정보

적용 대상