last word of string to uppercase csharp

Code Example - last word of string to uppercase csharp

                
                        var res = sentence.Substring(sentence.LastIndexOf(' ') + 1).ToUpper()