public void GetFieldFromDocument()
{
//ExStart
//ExFor:FieldChar.GetField
//ExId:GetField
//ExSummary:Demonstrates how to retrieve the field class from an existing FieldStart node in the document.
Document doc = new Document(MyDir + "Document.TableOfContents.doc");
FieldStart fieldStart = (FieldStart) doc.GetChild(NodeType.FieldStart, 0, true);
// Retrieve the facade object which represents the field in the document.
Field field = fieldStart.GetField();
Console.WriteLine("Field code:" + field.GetFieldCode());
Console.WriteLine("Field result: " + field.Result);
Console.WriteLine("Is locked: " + field.IsLocked);
// This updates only this field in the document.
field.Update();
//ExEnd
}