Result
Field.Result property
Gets or sets text that is between the field separator and field end.
public string Result { get; set; }
Examples
Shows how to insert a field into a document using a field code.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Field field = builder.InsertField("DATE \\@ \"dddd, MMMM dd, yyyy\"");
Assert.That(field.Type, Is.EqualTo(FieldType.FieldDate));
Assert.That(field.GetFieldCode(), Is.EqualTo("DATE \\@ \"dddd, MMMM dd, yyyy\""));
// This overload of the InsertField method automatically updates inserted fields.
Assert.That((DateTime.Today - DateTime.Parse(field.Result)).Days <= 1, Is.True);
See Also
- class Field
- namespace Aspose.Words.Fields
- assembly Aspose.Words