共用方式為


SPCmdlet.GetProp<T> Method

Retrieves the object from the Fields property that is associated with the specified field name.

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

Syntax

'Declaration
Protected Function GetProp(Of T As Class) ( _
    fieldName As String _
) As T
'Usage
Dim fieldName As String
Dim returnValue As T

returnValue = Me.GetProp(fieldName)
protected T GetProp<T>(
    string fieldName
)
where T : class

Type Parameters

  • T
    The type of the object.

Parameters

  • fieldName
    Type: System.String

    A string that provides the field name.

Return Value

Type: T
An object that is cast to the generic type T and associated with the specified field name. If no such object exists, this method returns null.

See Also

Reference

SPCmdlet Class

SPCmdlet Members

Microsoft.SharePoint.PowerShell Namespace