Hi,
I am working on a content type project in visual studio 2010 to add a new column field and to delete when a feature is uninstalled. (I am new to sharepoint programming.) when I debugged the code, got the the following errors:
Error 2 Argument 1: cannot convert from 'string' to 'System.Guid'
Error 1 The best overloaded method match for 'Microsoft.SharePoint.SPFieldCollection.Contains(System.Guid)' has some invalid arguments
public override void FeatureUninstalling(SPFeatureReceiverProperties properties) { SPWeb web = properties.Feature.Parent as SPWeb; string fieldId = "{15332F6E-13E7-40D3-AD71-EC0453D19544}"; if (web.Fields.Contains (fieldId)) { web.Fields[fieldId].Delete(); } }
any help appreciated.
thanks