DbConnectionStringBuilder.IsReadOnly 属性

定义

获取一个值,该值指示 DbConnectionStringBuilder 是否为只读。Gets a value that indicates whether the DbConnectionStringBuilder is read-only.

public:
 property bool IsReadOnly { bool get(); };
public bool IsReadOnly { get; }
[System.ComponentModel.Browsable(false)]
public bool IsReadOnly { get; }
member this.IsReadOnly : bool
[<System.ComponentModel.Browsable(false)>]
member this.IsReadOnly : bool
Public ReadOnly Property IsReadOnly As Boolean

属性值

Boolean

如果 true 为只读,则为 DbConnectionStringBuilder;否则为 falsetrue if the DbConnectionStringBuilder is read-only; otherwise false. 默认为 falseThe default is false.

实现

属性

注解

在创建集合后,只读集合不允许添加、移除或修改元素。A read-only collection does not allow adding, removing, or modifying elements after the collection is created.

只读集合只是包含阻止修改集合的包装的集合;因此,如果对基础集合进行了更改,只读集合将反映这些更改。A read-only collection is just a collection with a wrapper that prevents modifying the collection; therefore, if changes are made to the underlying collection, the read-only collection reflects those changes.

适用于

另请参阅