v4.2.0
Extensions method added to string: MarkdownEncode(this string value)
.
Use it when building markdown message from parts, obtained from "unsafe" sources:
new SendMessage(message.Chat.Id, "Hello, " + message.From.Username?.MarkdownEncode() + "!")
{
ParseMode = SendMessage.ParseModeEnum.Markdown
}