static void Test() {
var buffer = new ThreeStringBuffer();
buffer[0] = "Hello";
buffer[1] = "I'm";
buffer[2] = "Ben";
ConsumeSpan(buffer);
}
// Notice that this function takes any ReadOnlySpan<string>, but we passed it a ThreeStringBuffer instance just fine.
static void ConsumeSpan(ReadOnlySpan<string> span) {
foreach (var str in span) Console.WriteLine(str); // Writes Hello / I'm / Ben across three lines on console
}