Is there anyway to use C# implicit operators from F#?

前端 未结 3 603
傲寒
傲寒 2021-01-07 23:35

If I have a C# class with implicit conversion to double, like so:

public class Parameter
{
    private double _value;
         


        
3条回答
  •  花落未央
    2021-01-07 23:51

    It won't let you do implicit conversions. Make your conversions explicit where you need to.

    See here for various ways to do it explicitly: http://natehoellein.blogspot.com/2008/02/basic-type-conversions-with-f.html

提交回复
热议问题