Replace the last character of a string in c#

Sor*_*ora 2 .net c# string replace substring

I have this string :

 string lat ="24.6669863852163";
Run Code Online (Sandbox Code Playgroud)

how can I replace the last Character '3' by '2' ?

Dar*_*ren 12

lat = lat.Substring(0, lat.Length-1) + "2";
Run Code Online (Sandbox Code Playgroud)