This documentation is archived and is not being maintained.
PassportIdentity.TicketAge Property
.NET Framework 1.1
Gets the time, in seconds, since the last ticket was issued or refreshed.
[Visual Basic] Public ReadOnly Property TicketAge As Integer [C#] public int TicketAge {get;} [C++] public: __property int get_TicketAge(); [JScript] public function get TicketAge() : int;
Property Value
The time, in seconds, since the last ticket was issued or refreshed.
Remarks
For more information, see the Passport SDK documentation in the MSDN Library at http://msdn.microsoft.com/library .
Example
[Visual Basic] ' Declare new PassportIdendity object as variable newPass. Dim newPass As System.Web.Security.PassportIdentity = New System.Web.Security.PassportIdentity() ' Build a string with the elapsed time since the user's ticket was last refreshed ' with the Passport Authority. Dim sElapsedTime As String = "Elapsed time since ticket refresh: " + newPass.TicketAge.ToString() + " seconds." [C#] // Declare new PassportIdendity object as variable newPass. System.Web.Security.PassportIdentity newPass = new System.Web.Security.PassportIdentity(); // Build a string with the elapsed time since the user's ticket was last refreshed with the Passport Authority. string sElapsedTime = "Elapsed time since ticket refresh: " + newPass.TicketAge.ToString() + " seconds."; [C++] // Declare new PassportIdendity object as variable newPass. PassportIdentity* newPass = new PassportIdentity(); // Build a string with the elapsed time since the user's ticket was last refreshed with the Passport Authority. String* sElapsedTime = String::Format( S"Elapsed time since ticket refresh: {0} seconds.", __box(newPass->TicketAge));
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family
See Also
PassportIdentity Class | PassportIdentity Members | System.Web.Security Namespace
Show: