Count
This property specifies the number of roles in the OracleRoleCollection
object or enabled on the current session.
Declaration
// C# public int Count{get;}
Property Value
Number of roles in this OracleRoleCollection
object or enabled on current session.
Remarks
For Oracle Database 23ai, 23.8 and earlier versions, this property only returns the total number of roles specified in the OracleConnection.Roles
property regardless whether the connection is open or closed.
For Oracle Database and ODP.NET versions 23.9 and later, this property returns the number of roles enabled on a connection when the connection is open.
When a reserved keyword for roles, such as ALL
or NONE
, is part of the OracleRoleCollection
object, the property value is the total items added to the object when the connection is closed. When the connection is open, this property returns the total number of roles enabled on the session.
For DRCP connections, until a session attaches to the OracleConnection
object, this property returns the total roles specified in OracleRoleCollection
object.