SPFieldCollection.AddFieldAsXml Method (String, Boolean, SPAddFieldOptions)
Creates a field based on the specified schema, Boolean value, and field options.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
public string AddFieldAsXml ( string schemaXml, bool addToDefaultView, SPAddFieldOptions op )
Parameters
- schemaXml
A Collaborative Application Markup Language (CAML) string that contains the schema.
- addToDefaultView
true if field is added to the default list view; otherwise, false.
- op
An SPAddFieldOptions value that specifies the field options.