public ReadOnlyMemory<byte> ToEncoded()
return new byte[] { 1, 2, 3, 4 };
public static void Main()
Key? a = CreateKey(false);
Key? b = CreateKey(true);
public static Key? CreateKey(bool actuallyCreate)
return actuallyCreate ? new Key() : null;
public static void DoThing(ReadOnlyMemory<byte>? data, bool isEncoded = false)
Console.WriteLine($"Data HasValue = {data.HasValue} and isEncoded = {isEncoded}");
Console.WriteLine(data.Value.Length);