QuickOPC User's Guide and Reference
GetMonthsToMaximumExpirationDate Method (CertificateGenerationParameters)



OpcLabs.BaseLib Assembly > OpcLabs.BaseLib.Security Namespace > CertificateGenerationParameters Class : GetMonthsToMaximumExpirationDate Method
The date from which to calculate the number of months.
Calculates the number of months remaining to the certificate maximum expiration date.
Syntax
'Declaration
 
Public Function GetMonthsToMaximumExpirationDate( _
   ByVal fromDateTime As Date _
) As Integer
'Usage
 
Dim instance As CertificateGenerationParameters
Dim fromDateTime As Date
Dim value As Integer
 
value = instance.GetMonthsToMaximumExpirationDate(fromDateTime)
public int GetMonthsToMaximumExpirationDate( 
   DateTime fromDateTime
)
public:
int GetMonthsToMaximumExpirationDate( 
   DateTime fromDateTime
) 

Parameters

fromDateTime
The date from which to calculate the number of months.

Return Value

Number of months to the maximum expiration date.
Remarks

The return value depends on MaximumExpirationDate but not on DefaultValidityPeriodInMonths.

This method or property does not throw any exceptions, aside from execution exceptions such as System.Threading.ThreadAbortException or System.OutOfMemoryException.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also