This topic has not yet been rated - Rate this topic

SPField.GetCustomProperty Method

Gets the value of custom property with the specified name.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
public Object GetCustomProperty(
	string propertyName
)

Parameters

propertyName
Type: System.String
The name of the property.

Return Value

Type: System.Object
The value of the property.
Exception Condition
ArgumentNullException

propertyName is null or empty.

This method gets the value of a custom property with the specified property name.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Returns null if PropertyName not found
This will return null (Empty in Visual Basic) if PropertyName is not found in custom properties.