开发者

Providing parameter names for delegate types

Is it possible to specify parameter names for delegate types in F#? When I create a delegate of this type in F#:

type DataValidationEventHandler = delegate of obj * DataValidationEventArgs -> unit

...it auto-generates this signature for the handler in 开发者_如何学运维C#:

static void loader_ValidationEvent(object __p1, DataValidationEventArgs __p2)

Ideally it would generate the usual 'sender' and 'e' parameter names.


Yes:

type DataValidationEventHandler = delegate of sender:obj * e:DataValidationEventArgs -> unit


Yes:

type MyDel = delegate of o:obj * ea:System.EventArgs -> unit

names them o and ea.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜