Skip to content

Commit 583e706

Browse files
Update docs/csharp/misc/cs0077.md
Co-authored-by: Bartosz Klonowski <[email protected]>
1 parent d941cf0 commit 583e706

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/csharp/misc/cs0077.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ class M
4141
o1 = new C();
4242
o2 = new S();
4343

44+
s = o2 as S; // CS0077, S is not a reference type
45+
4446
// Use pattern matching instead of as
4547
if (o2 is S sValue)
4648
{

0 commit comments

Comments
 (0)