0

I'm still learning C# and I don't know if it's possible but if I summary a class, I want this comment to show when I instantiate it in another class.

I want to do this:

/// <summary>
/// This is my class
/// </summary>
class MyClass {}
// in the main for examples
class Program
{
    // And I want the comments I write shown here when I hover it
    MyClass m = new MyClass()
}

Is it possible guys?

4
  • 6
    Doesn't it already show up when you hover MyClass? Even if you use var, when you hover var, it still shows up the correct class and its summary. Commented Apr 21, 2024 at 18:12
  • Yea, this works by default (and is the main purpose of this cool feature). There might however be some option to disable it. Commented Apr 21, 2024 at 20:06
  • Yeah it work when I hover it in the MyClass class but not in the program Commented Apr 22, 2024 at 6:39
  • Yes, it works in the program when you hover over the MyClass that is in MyClass m. Commented Apr 22, 2024 at 7:35

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.