Enum documentation comments

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul Speranza

    #1

    Enum documentation comments

    Can anyone tell me the proper way to document enums so that the compiler
    won't warn me when I have it generate an xml file for help?

    For the following code...

    /// <summary>

    /// This is the enum for the employee contribution.

    /// </summary>

    public enum ContributionInt erval {Monthly,

    Quarterly,

    SemiAnnually,

    Annually};


    ....here is what the compiler tells me

    C:\MyDir\MyApp\ Common\Eligibil ity.cs(19,13): warning CS1591: Missing XML
    comment for publicly visible type or member
    MyCompany.Commo n.Eligibility.C ontributionInte rval.Annually'





    Regards,
    Paul Speranza


  • Jon Skeet

    #2
    Re: Enum documentation comments

    Paul Speranza <paulsperanza@h otmail.com> wrote:[color=blue]
    > Can anyone tell me the proper way to document enums so that the compiler
    > won't warn me when I have it generate an xml file for help?
    >
    > For the following code...
    >
    > /// <summary>
    >
    > /// This is the enum for the employee contribution.
    >
    > /// </summary>
    >
    > public enum ContributionInt erval {Monthly,
    >
    > Quarterly,
    >
    > SemiAnnually,
    >
    > Annually};
    >
    >
    > ...here is what the compiler tells me
    >
    > C:\MyDir\MyApp\ Common\Eligibil ity.cs(19,13): warning CS1591: Missing XML
    > comment for publicly visible type or member
    > MyCompany.Commo n.Eligibility.C ontributionInte rval.Annually'[/color]

    Give documentation for each enum member, usually a <summary> bit.

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    • Karen Martinez

      #3
      Re: Enum documentation comments

      /// <summary>
      /// This is the enum for the employee contribution.
      /// </summary>
      public enum ContributionInt erval {
      /// <summary>
      /// Monthly description
      ///</summary>
      Monthly,
      /// <summary>
      /// Quarterly description
      /// </summary>
      Quarterly,
      /// <summary>
      /// SemiAnually description
      /// </summary>
      SemiAnnually,
      /// <summary>
      /// Annually description
      /// </summary>
      Annually
      };



      "Paul Speranza" <paulsperanza@h otmail.com> wrote in message
      news:uPsRNseiDH A.884@TK2MSFTNG P10.phx.gbl...[color=blue]
      > Can anyone tell me the proper way to document enums so that the compiler
      > won't warn me when I have it generate an xml file for help?
      >
      > For the following code...
      >
      > /// <summary>
      >
      > /// This is the enum for the employee contribution.
      >
      > /// </summary>
      >
      > public enum ContributionInt erval {Monthly,
      >
      > Quarterly,
      >
      > SemiAnnually,
      >
      > Annually};
      >
      >
      > ...here is what the compiler tells me
      >
      > C:\MyDir\MyApp\ Common\Eligibil ity.cs(19,13): warning CS1591: Missing XML
      > comment for publicly visible type or member
      > MyCompany.Commo n.Eligibility.C ontributionInte rval.Annually'
      >
      >
      >
      >
      >
      > Regards,
      > Paul Speranza
      >
      >[/color]


      Comment

      • Karen Martinez

        #4
        Re: Enum documentation comments

        /// <summary>
        /// This is the enum for the employee contribution.
        /// </summary>
        public enum ContributionInt erval {
        /// <summary>
        /// Monthly description
        ///</summary>
        Monthly,
        /// <summary>
        /// Quarterly description
        /// </summary>
        Quarterly,
        /// <summary>
        /// SemiAnually description
        /// </summary>
        SemiAnnually,
        /// <summary>
        /// Annually description
        /// </summary>
        Annually
        };



        "Paul Speranza" <paulsperanza@h otmail.com> wrote in message
        news:uPsRNseiDH A.884@TK2MSFTNG P10.phx.gbl...[color=blue]
        > Can anyone tell me the proper way to document enums so that the compiler
        > won't warn me when I have it generate an xml file for help?
        >
        > For the following code...
        >
        > /// <summary>
        >
        > /// This is the enum for the employee contribution.
        >
        > /// </summary>
        >
        > public enum ContributionInt erval {Monthly,
        >
        > Quarterly,
        >
        > SemiAnnually,
        >
        > Annually};
        >
        >
        > ...here is what the compiler tells me
        >
        > C:\MyDir\MyApp\ Common\Eligibil ity.cs(19,13): warning CS1591: Missing XML
        > comment for publicly visible type or member
        > MyCompany.Commo n.Eligibility.C ontributionInte rval.Annually'
        >
        >
        >
        >
        >
        > Regards,
        > Paul Speranza
        >
        >[/color]


        Comment

        • Paul Speranza

          #5
          Re: Enum documentation comments

          Karen and Jon,

          Thank you both very much. I could not find this anywhere
          in the online help and it wasn't obvious to me. This
          issue is resolved.

          Regards,
          Paul Speranza

          [color=blue]
          >-----Original Message-----
          >/// <summary>
          >/// This is the enum for the employee contribution.
          >/// </summary>
          >public enum ContributionInt erval {
          > /// <summary>
          > /// Monthly description
          > ///</summary>
          > Monthly,
          > /// <summary>
          > /// Quarterly description
          > /// </summary>
          > Quarterly,
          > /// <summary>
          > /// SemiAnually description
          > /// </summary>
          > SemiAnnually,
          > /// <summary>
          > /// Annually description
          > /// </summary>
          > Annually
          >};
          >
          >
          >
          >"Paul Speranza" <paulsperanza@h otmail.com> wrote in[/color]
          message[color=blue]
          >news:uPsRNseiD HA.884@TK2MSFTN GP10.phx.gbl...[color=green]
          >> Can anyone tell me the proper way to document enums so[/color][/color]
          that the compiler[color=blue][color=green]
          >> won't warn me when I have it generate an xml file for[/color][/color]
          help?[color=blue][color=green]
          >>
          >> For the following code...
          >>
          >> /// <summary>
          >>
          >> /// This is the enum for the employee contribution.
          >>
          >> /// </summary>
          >>
          >> public enum ContributionInt erval {Monthly,
          >>
          >>[/color][/color]
          Quarterly,[color=blue][color=green]
          >>
          >>[/color][/color]
          SemiAnnually,[color=blue][color=green]
          >>
          >>[/color][/color]
          Annually};[color=blue][color=green]
          >>
          >>
          >> ...here is what the compiler tells me
          >>
          >> C:\MyDir\MyApp\ Common\Eligibil ity.cs(19,13): warning[/color][/color]
          CS1591: Missing XML[color=blue][color=green]
          >> comment for publicly visible type or member
          >>[/color][/color]
          MyCompany.Commo n.Eligibility.C ontributionInte rval.Annually
          '[color=blue][color=green]
          >>
          >>
          >>
          >>
          >>
          >> Regards,
          >> Paul Speranza
          >>
          >>[/color]
          >
          >
          >.
          >[/color]

          Comment

          Working...