AFSecurityRightsExtension.CanWrite Method
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
This extension method determines if the current user has
Write access to the object.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static bool CanWrite( this AFSecurityRights item )
<ExtensionAttribute> Public Shared Function CanWrite ( item As AFSecurityRights ) As Boolean Dim item As AFSecurityRights Dim returnValue As Boolean returnValue = item.CanWrite()
public: [ExtensionAttribute] static bool CanWrite( AFSecurityRights item )
[<ExtensionAttribute>] static member CanWrite : item : AFSecurityRights -> bool
Parameters
- item
- Type: OSIsoft.AFAFSecurityRights
The AFSecurityRights that are be checked for Write access.
Return Value
Type: BooleanReturns if the current user has Write access to the object.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type AFSecurityRights. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
For objects that are part of a database, the user must have write privileges
to the database as well.