Documenting F# Code

后端 未结 4 1618
时光取名叫无心
时光取名叫无心 2020-12-30 00:35

In a C# class with a single constructor, I can add class summary XML documentation and constructor XML documentation:

///
///This class will s         


        
4条回答
  •  旧时难觅i
    2020-12-30 01:02

    This really is an annoying problem. Another solution I ended up using is to not rely on a primary constructor:

    /// Documentation type.
    type Awesome =
        val sauce : string
        /// Documentation constructor.
        /// Sauce. Lots of it.
        new (sauce) = { sauce = sauce }
    

    More verbose, but no extra files or private constructors needed...

提交回复
热议问题