I am using Visual Studio Code to learn C# and I wrote the following code:
<code>string value = "abc123";
List<char> valueList = value.ToList<char>();
</code>
<code>string value = "abc123";
List<char> valueList = value.ToList<char>();
</code>
string value = "abc123";
List<char> valueList = value.ToList<char>();
I understand this first piece of code perfectly.
However, VS Code suggested another syntax for the second line of code, giving :
<code>string value = "abc123";
List<char> valueList = [.. value];
</code>
<code>string value = "abc123";
List<char> valueList = [.. value];
</code>
string value = "abc123";
List<char> valueList = [.. value];
I have been looking for more information about this syntax, but I have not been able to find anything about it.
I want to understand the syntax [.. value]
.
What is the name of such a structure and how does it work ?