X509Certificate.GetEffectiveDateString 메서드

정의

이 X.509v3 인증서의 개시 날짜를 반환합니다.

public:
 virtual System::String ^ GetEffectiveDateString();
public virtual string GetEffectiveDateString ();
abstract member GetEffectiveDateString : unit -> string
override this.GetEffectiveDateString : unit -> string
Public Overridable Function GetEffectiveDateString () As String

반환

이 Authenticode X.509 v.3 인증서의 개시 날짜입니다.

예제

다음 예제에서는 메서드를 GetEffectiveDateString 사용하여 인증서의 유효 날짜를 가져와 콘솔에 표시합니다.

using namespace System;
using namespace System::Security::Cryptography::X509Certificates;
int main()
{
   
   // The path to the certificate.
   String^ Certificate = "Certificate.cer";
   
   // Load the certificate into an X509Certificate object.
   X509Certificate^ cert = X509Certificate::CreateFromCertFile( Certificate );
   
   // Get the value.
   String^ results = cert->GetEffectiveDateString();
   
   // Display the value to the console.
   Console::WriteLine( results );
}

using System;
using System.Security.Cryptography.X509Certificates;

public class X509
{

    public static void Main()
    {

        // The path to the certificate.
        string Certificate =  "Certificate.cer";

        // Load the certificate into an X509Certificate object.
        X509Certificate cert = X509Certificate.CreateFromCertFile(Certificate);

        // Get the value.
        string results = cert.GetEffectiveDateString();

        // Display the value to the console.
        Console.WriteLine(results);
    }
}
Imports System.Security.Cryptography.X509Certificates




Public Class X509
   
   
   Public Shared Sub Main()
      
      ' The path to the certificate.
      Dim Certificate As String = "Certificate.cer"
      
      ' Load the certificate into an X509Certificate object.
      Dim cert As X509Certificate = X509Certificate.CreateFromCertFile(Certificate)
      
      ' Get the value.
      Dim results As String = cert.GetEffectiveDateString()
      
      ' Display the value to the console.
      Console.WriteLine(results)
   End Sub
End Class

설명

유효 날짜는 X.509 인증서가 유효한 것으로 간주되는 날짜입니다.

메서드는 GetEffectiveDateString 짧은 날짜 패턴으로 서식이 지정된 날짜와 Long Time Pattern 형식의 시간을 보여 주는 문자열을 반환합니다. 날짜 및 시간은 현재 문화권 및 표준 시간대를 사용하여 형식이 지정됩니다.

적용 대상