ColumnAttribute Class

Specifies that the property is mapped to a field (column) in a Microsoft SharePoint Foundation list.

Inheritance Hierarchy


Namespace:  Microsoft.SharePoint.Linq
Assembly:  Microsoft.SharePoint.Linq (in Microsoft.SharePoint.Linq.dll)


<AttributeUsageAttribute(AttributeTargets.Property Or AttributeTargets.Field, AllowMultiple := False)> _
Public NotInheritable Class ColumnAttribute _
    Inherits DataAttribute
Dim instance As ColumnAttribute
[AttributeUsageAttribute(AttributeTargets.Property|AttributeTargets.Field, AllowMultiple = false)]
public sealed class ColumnAttribute : DataAttribute


Every property that is mapped to a field must have this attribute..


The following is an example of a content type class with a property that is decorated with the ColumnAttribute:

[ContentType(Name="Item", Id="0x01", List="Team Members")]
public partial class TeamMembersItem : Item {
    private System.Nullable<double> _memberID;
    public TeamMembersItem() {

    [Column(Name="MemberID", Storage="_memberID", Required=true, FieldType="Number")]
    public System.Nullable<double> MemberID {
        get {
            return this._memberID;
        set {
            if ((this._memberID != value)) {
                this.OnPropertyChanging("MemberID", this._memberID);
                this._memberID = value;

    // Other members omitted for readability.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


ColumnAttribute Members

Microsoft.SharePoint.Linq Namespace