Skip to content

Commit 8f2e4b3

Browse files
authored
Fix json sample (#34284)
1 parent bbbe10b commit 8f2e4b3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/core/whats-new/dotnet-8.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Various improvements have been made to <xref:System.Text.Json?displayProperty=fu
4848
- Support for serializing properties from interface hierarchies. The following code shows an example where the properties from both the immediately implemented interface and its base interface are serialized.
4949

5050
```csharp
51-
IDerived value = new Derived { Base = 0, Derived =1 };
51+
IDerived value = new DerivedImplement { Base = 0, Derived =1 };
5252
JsonSerializer.Serialize(value); // {"Base":0,"Derived":1}
5353
5454
public interface IBase
@@ -61,7 +61,7 @@ Various improvements have been made to <xref:System.Text.Json?displayProperty=fu
6161
public int Derived { get; set; }
6262
}
6363

64-
public class Derived : IDerived
64+
public class DerivedImplement : IDerived
6565
{
6666
public int Base { get; set; }
6767
public int Derived { get; set; }

0 commit comments

Comments
 (0)