How to refer to the parameter of another method?

Is it possible to refer to the parameter using a different method than the one you are writing the resume, and if so, what is the syntax.

I know about <paramref name="..."/>, but I do not know how to reference another method.

A simple humorous example in case I don't let myself know:

/// <summary>
/// Does magical Foo things!
/// </summary>
/// <param name="magic">Magic Toggle!</param>
public void Foo(bool magic)
{
    //...
}

/// <summary>
/// Does Bar things. More down to earth, no <paramref name="Foo(bool).magic"/> involved!
/// </summary>
public void Bar()
{
    //...
}

(Obviously, this is not very convenient, it is just for illustrative purposes.)

+6
source share
1 answer

There is no recommended tag for this .

, , - MSDN, . , , . XML, , XML , , , , "" , , .

- :

interface IFoo
{
    void Foo(object otherParam);

    /// <summary>Documentation for this method.</summary>
    /// <returns>The object passed as the otherParam argument of
    /// the <see cref="Foo" /> method.</returns>
    object Bar();
}
+1

Source: https://habr.com/ru/post/1017285/


All Articles