As others already pointed out, the names of compiled members are exactly the same as the names you wrote in the F# code. In general, it is a good idea to follow standard C# naming conventions when declaring classes. When declaring an F# module then you can either use camelCase
(especially for modules that are intended for F# users) or PascalCase
if you want to use them from C#.
Also, there is one trick that you can use (this is used in the F# core library for functions like List.map
that are actually compiled as List.Map
). You can use the CompiledName
attribute to specify the name in the compiled version:
module Bar =
[<CompiledName("Foo")>]
let foo a = a + 1
It is probably better to use a unified naming convention, but if you want to keep a nice short name for F# users and standard .NET name for C# users, this is an interesting option.