C#: Add example of sealing ToString on a record type.

This commit is contained in:
Michael Nebel
2022-01-11 13:57:29 +01:00
parent 2a36744deb
commit ae5d3a1ccb

View File

@@ -0,0 +1,6 @@
using System;
public record MyEntry(string Name, string Address)
{
sealed public override string ToString() => $"{Name} lives at {Address}";
};