DataSetFieldSchema 类

定义

表示数据字段的结构或架构。Represents the structure, or schema, of a data field.

public ref class DataSetFieldSchema sealed : System::Web::UI::Design::IDataSourceFieldSchema
public sealed class DataSetFieldSchema : System.Web.UI.Design.IDataSourceFieldSchema
type DataSetFieldSchema = class
    interface IDataSourceFieldSchema
Public NotInheritable Class DataSetFieldSchema
Implements IDataSourceFieldSchema
继承
DataSetFieldSchema
实现

注解

使用类可通过获取数据字段的属性DataColumnDataSetFieldSchemaUse the DataSetFieldSchema class to get the properties of a data field using a DataColumn. 您可以使用此类中的以下属性来发现数据字段的结构: DataTypeIsReadOnlyLengthNameIsUniqueYou can discover the structure of a data field by using the following properties in this class: DataType, IsReadOnly, Length, Name, and IsUnique. 此外, 还可以使用Identity属性来确定是否为AutoIncrement设置了数据列, 或者PrimaryKey使用属性来确定数据列是否在主键中。In addition, you can use the Identity property to determine if a data column is set for AutoIncrement, or the PrimaryKey property to determine if a data column is in the primary key.

自定义控件设计器组件使用类在设计时提供有关数据字段的信息。DataSetFieldSchemaThe DataSetFieldSchema class is used by custom control designer components to provide information about a data field at design time.

若要使用DataSet检查数据的组件, 请使用以下类。To examine the components of data using a DataSet, use the following classes.

构造函数

DataSetFieldSchema(DataColumn)

使用指定 DataSetFieldSchema 初始化 DataColumn 类的新实例。Initializes a new instance of the DataSetFieldSchema class using a specified DataColumn.

属性

DataType

获取数据字段中存储的数据的类型。Gets the type of data stored in the data field.

Identity

获取一个值,该值指示对于向表或视图添加的每一个新行,数据字段的值是否自动递增。Gets a value indicating whether the value of the data field automatically increments for each new row added to the table or view.

IsReadOnly

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

IsUnique

获取一个值,该值指示数据字段中的值是否必须唯一。Gets a value indicating whether values in the data field are required to be unique.

Length

获取一个值,该值指示可在数据字段中存储的数据的大小。Gets a value indicating the size of data that can be stored in the data field.

Name

获取数据字段的名称。Gets the name of the data field.

Nullable

获取一个值,该值指示数据字段是否可接受 null 值。Gets a value indicating whether the data field can accept null values.

Precision

获取用于在数据字段中呈现数值的最大位数。Gets the maximum number of digits used to represent a numerical value in the data field.

PrimaryKey

获取一个值,该值指示数据字段是否位于包含表或视图的主键中。Gets a value indicating whether the data field is in the primary key for the containing table or view.

Scale

获取数据字段中的数值将解析到的小数位数。Gets the number of decimal places to which numerical values in the data field are resolved.

方法

Equals(Object)

确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅