Can anyone tell me how can I get the custom fields from a sharepoint list? I don't want to get all the fields like hidden, just the custom ones or the ones in the default view. The end result will be to save the schemaxml for each field in an xml file.
I am trying to do it like this:
SPfieldCollection fields = list.DefaultView.ViewFields
foreach(SPField field in fields)
{
....
}
Powershell or C# will be very helpful. Thank you