Share via


SPBuiltInFieldId.Comment field

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

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

Syntax

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

value = SPBuiltInFieldId.Comment
public static readonly Guid Comment

Examples

SPSite oSiteCollection = SPContext.Current.Site;

SPWebCollection collWebsites = siteCollection.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)

{

SPField siteCommentGuid =

oDocumentLibrary.Fields[SPBuiltInFieldId.Comment);

SPFieldLink link = new SPFieldLink(siteColumn);

SPContentType anncOnList =

taskList.ContentTypes[anncType.Name];

anncOnList = taskList.ContentTypes[anncType.Name];

anncOnList.FieldLinks[anncOnList.FieldLinks.Count - 1].Name

}

}

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