Skip to main content

FSharp Option Type - Community / GemBox.Document Feature Request - GemBox Support Center

This may apply to more than just Document, but it is the software we are using. While not a high priority, it would be nice for GemBox.Document to fully support the FSharp option type for mail merge, and possibly other functionality in GemBox.Document and other GemBox products. The type defines the ToString method by converting its internal value to a string, and wrapping that text with "Some()". I'm not sure the best way to support this without taking a full dependency on FSharp.Core, but, two possible solutions would include using reflection to get the "Value" property (this is designed to throw an exception for None, but None is interpreted as null, so it shouldn't be a problem), or take the ToString of the value, and, if it starts with "Some(", remove that text, as well as the ")" at the end.

Add a comment

Please log in or register to submit a comment.

Need a password reminder?