Using .. in arrays

Hello everyone who is reading this post. When reviewing the solutions of an exercise, I noticed that […] is used within the Array. Could you explain a little more how is the function / implementation of this?

He has me with the intention of learning more. I leave the method so that you have a better understanding of what I ask :)


Translated by Google

public static string Message(string logLine) =>
        logLine[(logLine.IndexOf(':') + 1)..].Trim();

You can read a lot of information about this C# feature here:

1 Like