Condividi tramite


SPContentType.Name Property

Gets or sets the content type name.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
<ClientCallableConstraintAttribute(Type := ClientCallableConstraintType.NotNull)> _
<ClientCallableAttribute> _
Public Property Name As String
    Get
    Set
'Usage
Dim instance As SPContentType
Dim value As String

value = instance.Name

instance.Name = value
[ClientCallableConstraintAttribute(Type = ClientCallableConstraintType.NotNull)]
[ClientCallableAttribute]
public string Name { get; set; }

Property Value

Type: System.String
The content type name.

Remarks

Before you set a value for this property, you should use the ValidateName(String) method to determine whether the proposed name is valid.

The value that is returned by the Name property can be localized so that it changes with the value of the current thread's CurrentUICulture property. For more information, see the DescriptionResource property.

See Also

Reference

SPContentType Class

SPContentType Members

Microsoft.SharePoint Namespace

NameResource