Languages
[Edit]
EN

C# / .NET - replace last character in string

3 points
Created by:
Theodora-Battle
528

In C#/.NET it is possible to replace last character in string in few ways.

1. string.Substring example

Edit

Output:

2. Regex.Replace example

Edit

Output:

Note:

Duplicated article: C# / .NET - replace last char in string

In the future, combine these 2 articles into one.

References

Edit
  1. String.Substring - Microsoft Docs
  2. Regex - Microsoft Docs
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Cross technology - replace last char in string

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join