Partager via


LifeTime Constructor (DateTime, DateTime)

Initializes a new instance of the LifeTime class using the specified creation time and expiration time.

Namespace: Microsoft.Web.Services3.Security
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)

Usage

'Usage
Dim created As DateTime
Dim expires As DateTime
Dim lifeTime1 As New LifeTime(created, expires)

Syntax

'Declaration
Public Sub New( _
    ByVal created As DateTime, _
    ByVal expires As DateTime _
)
public LifeTime(
    DateTime created, 
    DateTime expires
);
public:
LifeTime(
    DateTime^ created, 
    DateTime^ expires
);
public LifeTime(
    DateTime created, 
    DateTime expires
);
public function LifeTime(
     created : DateTime, 
     expires : DateTime
);

Parameters

  • created
    A DateTime that specifies the creation time.
  • expires
    A DateTime that specifies the expiration time.

Exceptions

Exception type Condition
ArgumentException

expires is not System.DateTime.MaxValue and is a time in the past.

-or-

expires is set to a time before created.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server

Target Platforms

See Also

Reference

LifeTime Class
LifeTime Members
Microsoft.Web.Services3.Security Namespace