Skip to content

Commit

Permalink
Update ZeroC.Slice README (#4083)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone committed Sep 18, 2024
1 parent 15b63d2 commit 0b66266
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ZeroC.Slice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ struct Person {
public partial record struct Person
{
public string Name;
public required string Name { get; set; }

public int Id;
public int Id { get; set; }

public string? Email;
public string? Email { get; set; }

/// <summary>Constructs a new instance of <see cref="Person" />.</summary>
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public Person(string name, int id, string? email)
{
this.Name = name;
Expand All @@ -47,6 +48,7 @@ public partial record struct Person
/// <summary>Constructs a new instance of <see cref="Person" /> and decodes its fields
/// from a Slice decoder.</summary>
/// <param name="decoder">The Slice decoder.</param>
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public Person(ref SliceDecoder decoder)
{
this.Name = decoder.DecodeString();
Expand Down

0 comments on commit 0b66266

Please sign in to comment.