Author Topic: C# Doc comments and annotations  (Read 260 times)

jporkkahtc

  • Senior Community Member
  • Posts: 1884
  • Hero Points: 183
  • Text
C# Doc comments and annotations
« on: November 13, 2019, 12:55:15 am »
Slick wants to put doc comments between [Annotations] and the class/property/function.
Visual Studio likes to put the doc comments before the [Annotations]

Slick should put them before annotations, it looks better and it is compatible with Visual Studio.

Code: [Select]
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using System.Text;

namespace my.name.space
{
    [DataContract]
    /// <summary>
    ///  Slick wants to put doc comments between annotations and the class
    /// </summary>
    public class MyDataStuff
    {
        /// <summary>
        /// Visual Studio likes to put doc comments here instead!
        /// </summary>
        [DataMember(Name = "item1", EmitDefaultValue = false)]
        public string Item1 { get; set; }
    }
}

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2893
  • Hero Points: 436
Re: C# Doc comments and annotations
« Reply #1 on: November 13, 2019, 02:59:09 pm »
Will also look into this.

Marcel

  • Senior Community Member
  • Posts: 228
  • Hero Points: 26
Re: C# Doc comments and annotations
« Reply #2 on: November 13, 2019, 04:57:55 pm »
Same thing for Java.  Comments should be in front of annotations.