How would you remove a single character from a string?
string = string.Remove(3);
but it removes the third char and everything else.
According to the remove method signature:
public string Remove(
int startIndex,
int count
)
you need to provide a second parameter as the total number of characters to remove from startIndex
:
string = string.Remove(3, 1);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With