DataSet.CaseSensitive 属性

定义

获取或设置一个值,该值指示 DataTable 对象中的字符串比较是否区分大小写。Gets or sets a value indicating whether string comparisons within DataTable objects are case-sensitive.

public:
 property bool CaseSensitive { bool get(); void set(bool value); };
public bool CaseSensitive { get; set; }
[System.Data.DataSysDescription("DataSetCaseSensitiveDescr")]
public bool CaseSensitive { get; set; }
member this.CaseSensitive : bool with get, set
Public Property CaseSensitive As Boolean

属性值

true 如果字符串比较区分大小写,则为; 否则为。否则,falsetrue if string comparisons are case-sensitive; otherwise, false. 默认为 falseThe default is false.

属性

示例

下面的示例将切换 CaseSensitive 属性。The following example toggles the CaseSensitive property.

DataSet1.CaseSensitive = DataSet1.CaseSensitive Xor True

注解

CaseSensitive 属性影响使用 Select 方法时对 DataSet 中包含的每个 DataTable 对象执行排序、搜索和筛选操作的方式。The CaseSensitive property affects how sorting, searching, and filtering operations are performed on each DataTable object contained in a DataSet when using the Select method.

默认情况下,设置 DataSetCaseSensitive 属性还会将每个关联的 DataTableCaseSensitive 属性设置为相同的值。By default, setting the CaseSensitive property for a DataSet also sets the CaseSensitive property of each associated DataTable to the same value.

适用于

另请参阅