Skip to content

Commit 89e43b3

Browse files
authored
Bigboybamo patch 6 (#42866)
* Update access-modifiers.md Added description for file access type modifier * Update virtual.md
1 parent b1881ab commit 89e43b3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

docs/csharp/language-reference/keywords/virtual.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@ When a virtual method is invoked, the run-time type of the object is checked for
2828

2929
By default, methods are non-virtual. You cannot override a non-virtual method.
3030

31-
You cannot use the `virtual` modifier with the `static`, `abstract`, `private`, or `override` modifiers. The following example shows a virtual property:
31+
The following example shows a virtual property:
3232

3333
[!code-csharp[csrefKeywordsModifiers#26](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csrefKeywordsModifiers/CS/csrefKeywordsModifiers.cs#26)]
3434

3535
Virtual properties behave like virtual methods, except for the differences in declaration and invocation syntax.
3636

37-
- It is an error to use the `virtual` modifier on a static property.
38-
3937
- A virtual inherited property can be overridden in a derived class by including a property declaration that uses the `override` modifier.
4038

4139
## Example

0 commit comments

Comments
 (0)