Instantly share code, notes, and snippets.

Embed
What would you like to do?
string str = "Exemplo em C# 8";
string palavra = str[^4..^0];
Console.WriteLine(palavra);
string final = str[^4..];
Console.WriteLine(final);
string inicio = str[..7];
Console.WriteLine(inicio);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment