如何将F#函数转换为非genericsSystem.Action?
就像标题一样。 我有一个现有的C#库,我必须使用F#interop访问它。 其中一个方法将非genericsSystem.Action
委托作为参数。 如何将F#function(即unit->unit
)转换为该委托?
尝试使用直接强制转换时,会发生以下错误:
Multiple types exist called 'Action', taking different numbers of generic parameters. Provide a type instantiation to disambiguate the type resolution, eg 'Action'.