How to call the values of a C# enum in F# -


i'm writing f# code , i'd use enum value defined in c# assembly.
instance, in c# assembly i've got code

public enum myenum {     valuea,     valueb,     valuec } 

how call myenum.valuea in f#? when write that, compiler shouts:

invalid use of type name and/or object constructor. if necessary use 'new' , apply constructor arguments, e.g. 'new type(args)'. required signature is: myenum()

ok... i'm sorry, i've found problem... c# code actually:

public enum myenum {     @valuea,     @valueb,     @valuec } 

i know, it's weird, isn't "my" c# code...

to call in f#, have write:

myenum.``valuea`` 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -