Is the C # method private or virtual by default?

I know the definitions virtualand sealedkeywords, but if you do not use any of them with the method, can the method be overridden by default?

I am coming from vb.net background. This is similar to vb.net (from MSDN):

If the Overridable or NotOverridable modifier is not specified, the default depends on whether the property or method overrides the property or method of the base class. If a property or method overrides the property or method of the base class, the default value is Overridable; otherwise it is NotOverridable.

I just want to know that this is also true in C #.

+5
source share
4 answers

, . , .

, . ( MSDN)

, . . , , . ( MSDN)

+5

# .

+6

. Java, # virtual. sealed, , .

+2

, . .

+2
source

All Articles