public bool GetValue(string fieldName, out object fieldValue)
{
// Use reflection to get the property by name from the current object.
object obj = mEnumerator.Current;
Type curentRecordType = obj.GetType();
PropertyInfo property = curentRecordType.GetProperty(fieldName);
if (property != null)
{
fieldValue = property.GetValue(obj, null);
return true;
}
// Return False to the Aspose.Words mail merge engine to indicate the field was not found.
fieldValue = null;
return false;
}
// ExEnd:MyMailMergeDataSourceGetValue