public static void Run()
{
// ExStart:RemoveField
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_WorkingWithFields();
Document doc = new Document(dataDir + "Field.RemoveField.doc");
Field field = doc.Range.Fields[0];
// Calling this method completely removes the field from the document.
field.Remove();
// ExEnd:RemoveField
Console.WriteLine("\nRemoved field from the document successfully.");
}
}