Home > Software engineering >  How to add a description for a method?
How to add a description for a method?

Time:09-12

I have in one script this method :

public void StartFade(bool isIn, bool autoSwitch)
    {
        if (canvasGroup != null)
        {
            if (_currentRoutine != null)
            {
                if (_currentDirection != isIn)
                {
                    StopCoroutine(_currentRoutine);

                    _currentRoutine = StartCoroutine(Fade(canvasGroup, isIn, autoSwitch));
                }
            }
            else
            {
                _currentRoutine = StartCoroutine(Fade(canvasGroup, isIn, autoSwitch));
            }
        }
    }

then i'm calling this method in many other scripts like :

public void HoverOut()
    {
        fader.StartFade(false, false);
    }

when i type StartFade(

at this point i want to see some description of what the StartFade method do. now i only see :

method

CodePudding user response:

What you're looking for are XML Documentation Comments. The Microsoft Docs for them are enter image description here

  • Related