Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8055979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:34:11+00:00 2026-06-05T08:34:11+00:00

Am I correct that declaring a method abstract automatically makes it virtual? That is,

  • 0

Am I correct that declaring a method abstract automatically makes it virtual?

That is, in subclasses I can override it many times and at runtime, the method corresponding to the runtime type of the object will be called?

Is it possible to declare an abstract non-virtual method? That is, the method which must be implemented in a non-abstract subclass and can not be overridden?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T08:34:13+00:00Added an answer on June 5, 2026 at 8:34 am

    Yes, abstract methods are virtual by definition; they must be overridable in order to actually be overridden by subclasses:

    When an instance method declaration includes an abstract modifier, that method is said to be an abstract method. Although an abstract method is implicitly also a virtual method, it cannot have the modifier virtual.

    Conversely you can’t declare an abstract non-virtual method, because if you could, you would have a method that can’t be implemented and thus can never be called, making it rather useless.

    However, if you want to have a class implement an abstract method but not allow any of its subclasses to modify its implementation, that’s where sealed comes in. An example:

    abstract public class AbstractClass
    {
        abstract public void DoSomething();
    }
    
    public class BaseClass : AbstractClass
    {
        public sealed override void DoSomething()
        {
            Console.WriteLine("Did something");
        }
    }
    

    Notice that while the abstract method is (implicitly) virtual, the implementation in the concrete base class is non-virtual (because of the sealed keyword).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Would this be the correct way of declaring that an XML element Cluster contains
I am hoping someone can point out the correct way to specialize a method
Is it correct that the reveal applescript command is broken with iTunes 9? Works:
I'm new to Symfony. Is my understanding correct that the User class is actually
(1). When using C++ template, is it correct that the compiler (e.g. g++) will
My Visual Studio 2008 debugger is showing integers as hexadecimals, how to correct that?
Like in: u'Hello' My guess is that it indicates "Unicode", is that correct? If
Am I correct in thinking that dithering an image works in the following way:
Am I correct in assuming that if you have an object that is contained
Am I correct in thinking that that Python doesn't have a direct equivalent for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.