Permission.Count Property
Gets the number of UserPermissionObject objects associated with the form.
Namespace: Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)
Syntax
'Declaration
ReadOnly Property Count As Integer
Get
'Usage
Dim instance As Permission
Dim value As Integer
value = instance.Count
int Count { get; }
Property Value
Type: System.Int32
The number of UserPermissionObject objects associated with the form.
Remarks
Because the Permission object and its members are new to Microsoft InfoPath 2010, you must cast the object returned by the thisXDocument variable to the _XDocument3 type to access this object and its members. For more information, see How to: Use Microsoft.Office.Interop.InfoPath.SemiTrust Members That Are Not Compatible with InfoPath 2003.
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.
Examples
In the following example, the Count property is used to display the count of users associated with the form.
_XDocument3 thisDoc = (_XDocument3)thisXDocument;
thisXDocument.UI.Alert(thisDoc.Permission.Count.ToString());
Dim thisDoc As _XDocument3 = DirectCast(thisXDocument, _XDocument3)
thisXDocument.UI.Alert(thisDoc.Permission.Count.ToString())