I'm trying to figure out the F# equivalent of this C# Attribute delclaration:
[
ComImport(),
InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
Guid("000214EE-0000-0000-C000-000000000046")
]
I can do this and it compiles fine:
[<ComImport>]
[<InterfaceType(ComInterfaceType.InterfaceIsIUnknown)>]
[<Guid("000214EE-0000-0000-C000-000000000046")>]
But I am curious now--is it possible to combine multiple attributes in F#? When I try something like this for the first two attributes:
[<ComImport>,<InterfaceType(ComInterfaceType.InterfaceIsIUnknown)>]
I get an FS0010 error. Also tried this:
[<ComImport , InterfaceType(ComInterfaceType.InterfaceIsIUnknown)>]
Same result.
Is this possible and if so what's the correct syntax?
Yes.
[<
ComImport;
InterfaceType(ComInterfaceType.InterfaceIsIUnknown);
Guid("000214EE-0000-0000-C000-000000000046")
>]
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