Edit

Share via


UserPermission.ExpirationDate Property

Definition

Gets or sets the optional expiration date for the permissions on the current form assigned to the user associated with an instance of the UserPermission class.

public:
 abstract property DateTime ExpirationDate { DateTime get(); void set(DateTime value); };
public abstract DateTime ExpirationDate { get; set; }
member this.ExpirationDate : DateTime with get, set
Public MustOverride Property ExpirationDate As DateTime

Property Value

A System.DateTime that represents the expiration date for the user associated with the UserPermission object.

Examples

In the following example, clicking the Button control gets the specified user from UserPermissionsCollection for the current form, and then displays that user's expiration date.

public void CTRL1_Clicked(object sender, ClickedEventArgs e)
{
   UserPermission thisUser = 
      Permission.UserPermissions["someone@example.com"];
   MessageBox.Show(thisUser.ExpirationDate.ToString());
}
Public Sub CTRL1_Clicked(ByVal sender As Object, _
   ByVal e As ClickedEventArgs)
   UserPermission thisUser = 
      Permission.UserPermissions("someone@example.com")
   MessageBox.Show(thisUser.ExpirationDate.ToString())
End Sub

Remarks

An instance of the UserPermission class associates a set of permissions on the current form with a single user and an optional expiration date. The ExpirationDate property gets or sets the optional expiration date of this UserPermission object using the local time zone.

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.

Applies to