• System.Data.DataColumn.cs


    ylbtech-System.Data.DataColumn.cs
    1.返回顶部
    1、
    #region 程序集 System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
    // C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETFrameworkv4.6.1System.Data.dll
    #endregion
    
    using System.ComponentModel;
    using System.Reflection;
    
    namespace System.Data
    {
        //
        // 摘要:
        //     表示架构中的列 System.Data.DataTable。
        [DefaultMember("Item")]
        [DefaultProperty("ColumnName")]
        [DesignTimeVisible(false)]
        [Editor("Microsoft.VSDesigner.Data.Design.DataColumnEditor, Microsoft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
        [ToolboxItem(false)]
        public class DataColumn : MarshalByValueComponent
        {
            //
            // 摘要:
            //     新实例初始化 System.Data.DataColumn 类作为字符串类型。
            public DataColumn();
            //
            // 摘要:
            //     新实例初始化 System.Data.DataColumn 类作为类型为字符串,使用指定的列名称。
            //
            // 参数:
            //   columnName:
            //     一个表示要创建的列的名称的字符串。 如果设置为 null 或空字符串 (""),添加到列集合时,将指定一个默认名称。
            public DataColumn(string columnName);
            //
            // 摘要:
            //     新实例初始化 System.Data.DataColumn 类使用指定的列名称和数据类型。
            //
            // 参数:
            //   columnName:
            //     一个表示要创建的列的名称的字符串。 如果设置为 null 或空字符串 (""),添加到列集合时,将指定一个默认名称。
            //
            //   dataType:
            //     支持 System.Data.DataColumn.DataType。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     否 dataType 指定。
            public DataColumn(string columnName, Type dataType);
            //
            // 摘要:
            //     新实例初始化 System.Data.DataColumn 类使用指定的名称、 数据类型和表达式。
            //
            // 参数:
            //   columnName:
            //     一个表示要创建的列的名称的字符串。 如果设置为 null 或空字符串 (""),添加到列集合时,将指定一个默认名称。
            //
            //   dataType:
            //     支持 System.Data.DataColumn.DataType。
            //
            //   expr:
            //     用来创建此列的表达式。 有关更多信息,请参见 System.Data.DataColumn.Expression 属性。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     否 dataType 指定。
            public DataColumn(string columnName, Type dataType, string expr);
            //
            // 摘要:
            //     新实例初始化 System.Data.DataColumn 类使用指定的名称、 数据类型、 表达式和值,该值确定列是否是一个属性。
            //
            // 参数:
            //   columnName:
            //     一个表示要创建的列的名称的字符串。 如果设置为 null 或空字符串 (""),添加到列集合时,将指定一个默认名称。
            //
            //   dataType:
            //     支持 System.Data.DataColumn.DataType。
            //
            //   expr:
            //     用来创建此列的表达式。 有关更多信息,请参见 System.Data.DataColumn.Expression 属性。
            //
            //   type:
            //     System.Data.MappingType 值之一。
            //
            // 异常:
            //   T:System.ArgumentNullException:
            //     否 dataType 指定。
            public DataColumn(string columnName, Type dataType, string expr, MappingType type);
    
            //
            // 摘要:
            //     获取 System.Data.DataTable 列属于对。
            //
            // 返回结果:
            //     System.Data.DataTable , System.Data.DataColumn 属于。
            [Browsable(false)]
            [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnDataTableDescr")]
            public DataTable Table { get; }
            //
            // 摘要:
            //     获取或设置一个值,指示行已添加到表时,就立即列是否允许的更改。
            //
            // 返回结果:
            //     true 如果列只读的;否则为 false。 默认值为 false。
            //
            // 异常:
            //   T:System.ArgumentException:
            //     该属性设置为 false 计算所得的列。
            [DefaultValue(false)]
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnReadOnlyDescr")]
            public bool ReadOnly { get; set; }
            //
            // 摘要:
            //     获取 (从零开始) 中的列的位置 System.Data.DataColumnCollection 集合。
            //
            // 返回结果:
            //     列的位置。 如果列不是某个集合的成员,则获取-1。
            [Browsable(false)]
            [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnOrdinalDescr")]
            public int Ordinal { get; }
            //
            // 摘要:
            //     获取或设置的命名空间 System.Data.DataColumn。
            //
            // 返回结果:
            //     命名空间 System.Data.DataColumn。
            //
            // 异常:
            //   T:System.ArgumentException:
            //     命名空间已有数据。
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnNamespaceDescr")]
            public string Namespace { get; set; }
            //
            // 摘要:
            //     获取或设置文本列的最大长度。
            //
            // 返回结果:
            //     以字符为单位的列的最大长度。 如果该列具有没有最大长度,值为-1 (默认值)。
            [DefaultValue(-1)]
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnMaxLengthDescr")]
            public int MaxLength { get; set; }
            //
            // 摘要:
            //     获取与相关联的自定义用户信息的集合 System.Data.DataColumn。
            //
            // 返回结果:
            //     一个 System.Data.PropertyCollection 的自定义信息。
            [Browsable(false)]
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("ExtendedPropertiesDescr")]
            public PropertyCollection ExtendedProperties { get; }
            //
            // 摘要:
            //     获取或设置用来筛选行、 计算列中的值或创建聚合列的表达式。
            //
            // 返回结果:
            //     一个表达式来计算列的值或创建聚合列。 一个表达式,表达式的返回类型由 System.Data.DataColumn.DataType 的列。
            //
            // 异常:
            //   T:System.ArgumentException:
            //     System.Data.DataColumn.AutoIncrement 或 System.Data.DataColumn.Unique 属性设置为 true。
            //
            //   T:System.FormatException:
            //     当使用 CONVERT 函数时,表达式的计算结果为一个字符串,但该字符串不包含可以转换为类型参数中的表示形式。
            //
            //   T:System.InvalidCastException:
            //     当使用 CONVERT 函数时,所请求的转换不可能。 请参阅下列部分获取有关可能的强制转换详细信息中的转换函数。
            //
            //   T:System.ArgumentOutOfRangeException:
            //     当您使用 SUBSTRING 函数时,start 参数超出了范围。 - 或 - 当您使用 SUBSTRING 函数时,长度参数超出了范围。
            //
            //   T:System.Exception:
            //     当您使用 LEN 函数或 TRIM 函数时,该表达式计算结果不为字符串。 这包括表达式的计算结果为 System.Char。
            [DefaultValue("")]
            [RefreshProperties(RefreshProperties.All)]
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnExpressionDescr")]
            public string Expression { get; set; }
            //
            // 摘要:
            //     获取或设置列的默认值,则在创建新行。
            //
            // 返回结果:
            //     适合于列的值 System.Data.DataColumn.DataType。
            //
            // 异常:
            //   T:System.InvalidCastException:
            //     当添加行时,默认值不是列的数据类型的实例。
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnDefaultValueDescr")]
            [TypeConverter(typeof(DefaultValueTypeConverter))]
            public object DefaultValue { get; set; }
            //
            // 摘要:
            //     获取或设置 DateTimeMode 的列。
            //
            // 返回结果:
            //     System.Data.DataSetDateTime 为指定的列。
            [DefaultValue(DataSetDateTime.UnspecifiedLocal)]
            [RefreshProperties(RefreshProperties.All)]
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnDateTimeModeDescr")]
            public DataSetDateTime DateTimeMode { get; set; }
            //
            // 摘要:
            //     获取或设置列中存储的数据类型。
            //
            // 返回结果:
            //     一个 System.Type 对象,表示列的数据类型。
            //
            // 异常:
            //   T:System.ArgumentException:
            //     已在列存储的数据。
            [DefaultValue(typeof(string))]
            [RefreshProperties(RefreshProperties.All)]
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnDataTypeDescr")]
            [TypeConverter(typeof(ColumnTypeConverter))]
            public Type DataType { get; set; }
            //
            // 摘要:
            //     获取或设置 XML 前缀的命名空间别名 System.Data.DataTable。
            //
            // 返回结果:
            //     XML 前缀 System.Data.DataTable 命名空间。
            [DefaultValue("")]
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnPrefixDescr")]
            public string Prefix { get; set; }
            //
            // 摘要:
            //     获取或设置某一列使用的增量其 System.Data.DataColumn.AutoIncrement 属性设置为 true。
            //
            // 返回结果:
            //     列的值自动递增的编号。 默认值为 1。
            //
            // 异常:
            //   T:System.ArgumentException:
            //     设置的值为零。
            [DefaultValue(1)]
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnAutoIncrementStepDescr")]
            public long AutoIncrementStep { get; set; }
            //
            // 摘要:
            //     获取或设置列标题。
            //
            // 返回结果:
            //     列的标题。 如果未设置,则返回 System.Data.DataColumn.ColumnName 值。
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnCaptionDescr")]
            public string Caption { get; set; }
            //
            // 摘要:
            //     获取或设置一个值,该值指示是否必须唯一列的每个行中的值。
            //
            // 返回结果:
            //     true 如果值必须是唯一的。否则为 false。 默认值为 false。
            //
            // 异常:
            //   T:System.ArgumentException:
            //     列是计算的列。
            [DefaultValue(false)]
            [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnUniqueDescr")]
            public bool Unique { get; set; }
            //
            // 摘要:
            //     获取或设置包含的列的起始值及其 System.Data.DataColumn.AutoIncrement 属性设置为 true。 默认值为 0。
            //
            // 返回结果:
            //     起始值为 System.Data.DataColumn.AutoIncrement 特征。
            [DefaultValue(0)]
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnAutoIncrementSeedDescr")]
            public long AutoIncrementSeed { get; set; }
            //
            // 摘要:
            //     获取或设置一个值,指示该列是否自动递增的新行添加到表中列的值。
            //
            // 返回结果:
            //     true 如果列的值递增自动保存功能。,否则为 false。 默认值为 false。
            //
            // 异常:
            //   T:System.ArgumentException:
            //     列是计算所得的列。
            [DefaultValue(false)]
            [RefreshProperties(RefreshProperties.All)]
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnAutoIncrementDescr")]
            public bool AutoIncrement { get; set; }
            //
            // 摘要:
            //     获取或设置一个值,该值指示是否允许空值在本专栏中属于表的行。
            //
            // 返回结果:
            //     true 如果允许 null 值的值;否则为 false。 默认值为 true。
            [DefaultValue(true)]
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnAllowNullDescr")]
            public bool AllowDBNull { get; set; }
            //
            // 摘要:
            //     获取或设置中的列的名称 System.Data.DataColumnCollection。
            //
            // 返回结果:
            //     列的名称。
            //
            // 异常:
            //   T:System.ArgumentException:
            //     该属性设置为 null 或为空字符串和列属于一个集合。
            //
            //   T:System.Data.DuplicateNameException:
            //     集合中已存在具有相同名称的列。 名称比较不区分大小写。
            [DefaultValue("")]
            [RefreshProperties(RefreshProperties.All)]
            [ResCategoryAttribute("DataCategory_Data")]
            [ResDescriptionAttribute("DataColumnColumnNameDescr")]
            public string ColumnName { get; set; }
            //
            // 摘要:
            //     获取或设置 System.Data.MappingType 的列。
            //
            // 返回结果:
            //     System.Data.MappingType 值之一。
            [DefaultValue(MappingType.Element)]
            [ResDescriptionAttribute("DataColumnMappingDescr")]
            public virtual MappingType ColumnMapping { get; set; }
    
            //
            // 摘要:
            //     更改序号或位置 System.Data.DataColumn 到指定的序号或位置。
            //
            // 参数:
            //   ordinal:
            //     指定的序号。
            public void SetOrdinal(int ordinal);
            //
            // 摘要:
            //     获取 System.Data.DataColumn.Expression 列,如果存在。
            //
            // 返回结果:
            //     System.Data.DataColumn.Expression 值,此属性是否设置; 否则为 System.Data.DataColumn.ColumnName
            //     属性。
            public override string ToString();
            //
            // 摘要:
            //     此成员支持 .NET Framework 结构,不能在代码中直接使用。
            protected void CheckUnique();
            //
            // 摘要:
            //     此成员支持 .NET Framework 结构,不能在代码中直接使用。
            //
            // 参数:
            //   pcevent:
            //     参数的引用。
            protected virtual void OnPropertyChanging(PropertyChangedEventArgs pcevent);
            //
            // 摘要:
            //     此成员支持 .NET Framework 结构,不能在代码中直接使用。
            protected internal void CheckNotAllowNull();
            //
            // 摘要:
            //     此成员支持 .NET Framework 结构,不能在代码中直接使用。
            //
            // 参数:
            //   name:
            //     参数的引用。
            protected internal void RaisePropertyChanging(string name);
        }
    }
    2、
    2.返回顶部
     
    3.返回顶部
     
    4.返回顶部
     
    5.返回顶部
     
     
    6.返回顶部
     
    warn 作者:ylbtech
    出处:http://ylbtech.cnblogs.com/
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
  • 相关阅读:
    android 21 隐式意图启动系统预定义activity
    android 20 Intnet类重要的成员变量
    android 19 activity纵横屏切换的数据保存与恢复
    android 18 Bundle类
    android 17 activity生命周期
    Centos6.4建立本地yum源
    eclipse实现批量修改文件的编码方式
    [系统资源]/proc/meminfo和free输出解释
    监控WebLogic 8.x的解决方案(监控应用服务器系列文章)
    linux网络监控脚本
  • 原文地址:https://www.cnblogs.com/storebook/p/12651752.html
Copyright © 2020-2023  润新知