Skip to content

Add advanced inheritance topic links to VB Inheritance Basics#52261

Merged
BillWagner merged 3 commits intomainfrom
copilot/update-advanced-inheritance-info
Mar 12, 2026
Merged

Add advanced inheritance topic links to VB Inheritance Basics#52261
BillWagner merged 3 commits intomainfrom
copilot/update-advanced-inheritance-info

Conversation

Copy link
Contributor

Copilot AI commented Mar 11, 2026

The VB Inheritance Basics page had only 2 "See also" links, leaving readers without guidance on covariance, generics variance, abstract class design, shadowing vs overriding, and interfaces as a multiple-inheritance workaround.

Changes

Original prompt

This section details on the original issue you should resolve

<issue_title>Please Point to More Advanced Inheritance Information</issue_title>
<issue_description>There is a whole lot more to .NET inheritance than that. It would be helpful if this page would refer to more advanced data and best-practices, like:

What happens to inherited class variables? Can they be redefined as a type that is a sub-class of the original type? If not, can they be attached to objects derived from a sub-class of that type?

When an inherited class creates "more specific" types of a parent classes, what are the best strategies for attaching the "more specific types" to the inherited class variables, and calling inherited methods and functions on them?

Can a redefined (Overrides) function return a type that is a sub-type of its defined return type?

Can a redefined (Overrides) method define replacement argument types that are "more specific" sub-types of the inherited argument types?

Can a variable of type "List(Of my_class)" be attached to a "List(Of my_sub_class)" where 'my_sub_class' inherits from 'my_class'? If not, what's the best work-around for this?

All of these (by the way) should be supported features of .NET.... Only a hobbled version of the above exists in .NET, and I really need to see exactly what the restrictions are, rather than spending time coding and encountering compiler errors, when there is a RIGHT way of doing things.

Kind regards,
Vic


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Comments on the Issue (you are @copilot in this section)

@Youssef1313 @BillWagner Although this issue refers to the Visual Basic inheritance guide, you may consider these for the C# inheritance guide as well.

cc: @pkulikov </comment_new>
<comment_new>@BillWagner
@vwheeler63 Thanks for writing all this up.

It might be best to post these questions on a Q & A forum site such as stack overflow.

We will add more advanced content as we update these areas, but the focus of docs is not answer questions.

@BillWagner The fix here is to add links to more advanced topics on inheritance. It should focus on these areas:
  1. More advanced topics in the VB Guide.
  2. Topics in core and fundamentals.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Internal previews

📄 File 🔗 Preview link
docs/visual-basic/programming-guide/language-features/objects-and-classes/inheritance-basics.md Inheritance Basics (Visual Basic)

Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
Copilot AI changed the title [WIP] Update documentation to include advanced inheritance concepts Add advanced inheritance topic links to VB Inheritance Basics Mar 11, 2026
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM and is ready for final review.

@BillWagner BillWagner marked this pull request as ready for review March 11, 2026 17:50
@BillWagner BillWagner requested a review from a team as a code owner March 11, 2026 17:50
Copilot AI review requested due to automatic review settings March 11, 2026 17:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the Visual Basic Inheritance Basics documentation by expanding the See also section so readers can easily discover advanced inheritance-related topics (variance, generics, interfaces, shadowing vs. overriding, and design guidelines).

Changes:

  • Expanded the See also section from 2 to 10 links, adding 8 targeted references to more advanced topics.
  • Updated ms.date to the current date and added ai-usage: ai-assisted frontmatter.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@BillWagner BillWagner merged commit 1da5da1 into main Mar 12, 2026
11 checks passed
@BillWagner BillWagner deleted the copilot/update-advanced-inheritance-info branch March 12, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please Point to More Advanced Inheritance Information

4 participants