다음을 통해 공유


SPBuiltInFieldId._Comments Field

Identifies a field that contains comments that are associated with the specified SharePoint Foundation object.

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

Syntax

'Declaration
Public Shared ReadOnly _Comments As Guid
'Usage
Dim value As Guid

value = SPBuiltInFieldId._Comments
public static readonly Guid _Comments

Examples

SPSite oSiteCollection = SPContext.Current.Site;

SPWebCollection collWebsites = oSiteCollection.AllWebs;

foreach (SPWeb oWebsite in collWebsites)

{

SPListCollecion collLists = oWebsite.Lists;

foreach (SPList oList in lists

{

if (oList.BaseType == SPBaseType.DocumentLibrary)

{

SPDocumentLibrary oDocumentLibrary = (SPDocumentLibrary)oList;

if (!oDocumentLibrary.IsCatalog && oList.BaseTemplate !=

SPListTemplateType.XMLForm)

{

// get the value in the '_Comments' column

// of the object

SPField docComments =

oDocumentLibrary.Fields[SPBuiltInFieldId._Comments);

}

}

oWebsite.Dispose();

}

Note

Certain objects implement the IDisposable interface and you must avoid retaining these objects in memory after they are no longer needed. For information about good coding practices, see Disposing Objects.

See Also

Reference

SPBuiltInFieldId Class

SPBuiltInFieldId Members

Microsoft.SharePoint Namespace