ContentTypeAttribute.Name Property
Gets or sets the name of the content type.
Namespace: Microsoft.SharePoint.Linq
Assembly: Microsoft.SharePoint.Linq (in Microsoft.SharePoint.Linq.dll)
Syntax
'Declaration
Public Property Name As String
Get
Set
'Usage
Dim instance As ContentTypeAttribute
Dim value As String
value = instance.Name
instance.Name = value
public string Name { get; set; }
Property Value
Type: System.String
A String that represents the name of the content type.
Remarks
It is not necessary to set this property but it might make your code more readable because content type IDs are hard to read.
SPMetal, which we recommend that you use, automatically sets both the Id and Name properties on the ContentTypeAttribute decorations that it generates.
Examples
The following shows Name in use:
[ContentType(Name="Item", Id="0x01", List="Team Members")]
[DataContract()]
public partial class TeamMembersItem : Item {
// Member declarations omitted.
}