将C#翻译为F#

时间:2016-12-08 15:48:13

标签: f# member c#-to-f#

如何将以下C#代码翻译为F#?

public Autodesk.Revit.UI.Result OnStartup(UIControlledApplication application)
{
   return Result.Succeeded;
}

public Autodesk.Revit.UI.Result OnShutdown(UIControlledApplication application)
{
    return Result.Succeeded;
}

1 个答案:

答案 0 :(得分:4)

您只需将这些转换为成员:

member __.OnStartup (application : UIControlledApplication) =
    Result.Succeeded

member __.OnShutdown (application : UIControlledApplication) =
    Result.Succeeded