ForTextAttribute Class

Marks an instance field to be bound with the text inside the XML element.

C#
[AttributeUsage(System.AttributeTargets.Field, Inherited = false, AllowMultiple = false)]
public sealed class ForTextAttribute : Attribute
Inheritance
ForTextAttribute
Attributes

Remarks

If the Oxbinder<T> finds the XML elements containing a text node, it populate the annotated field with the value that the text node contains.

This annotation must mark an instance field whose type is string. And the class that has the instance field must be annotated with ForElementAttribute.

If there is an instance field annotated with ForTextAttribute in a class, the class must not have other instance fields annotated with it, instance methods annotated with FromTextAttribute, and be no static and final fields annotated with ElementSchemaAttribute.

Methods

Equals(object) (Inherited from Attribute)
GetHashCode() (Inherited from Attribute)
GetType() (Inherited from object)
MemberwiseClone() (Inherited from object)
ToString() (Inherited from object)

See Also