C#, How to make overload methods share <summary> tag

1.8k views Asked by At

I'm developing a small class, with my overload methods, like following:

/// <summary>
/// some description about myMethod
/// </summary>
/// <param name="arg1"></param>
/// <param name="arg2"></param>
/// <returns></returns>
public string myMethod(string arg1, string arg2) { };
public string myMethod(string arg1){};

The problem is that the method which take one argument does not show the description in tag. Should I separately add the same summary tag to the second method? I think it is a little annoying, because the myMethod description should has the same tag description, although the parameter description can vary.

Is there a way to make overload methods share one description?

1

There are 1 answers

0
AjaySingh On BEST ANSWER

Even though the method names are same, but they can have different implementation and can do different things. Hence you need to provide separate summary for each of them.