C# Sample:
XNamespace aw = "http://www.adventure-works.com";
How does F # I write?
I try that:
let ns : XNamespace = "URI ADDRESS";;
F# Say Error
F# doesn't have implicit operators, so:
let ns = XNamespace.op_Implicit "http://www.adventure-works.com"
If you use this a lot, you might want to put it in a function or operator to hide the ugliness a bit, e.g:
let inline xns n = XNamespace.op_Implicit n
let ns = xns "http://www.adventure-works.com"
F# doesn't have implicit operators, but you can use the Get()
method:
let ns = XNamespace.Get "URI ADDRESS"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With