string buttonName = "button1"; string buttonShortcut = "B"; buttonName = Regex.Replace(buttonName, buttonShortcut, "&" + buttonShortcut, RegexOptions.IgnoreCase); button1.Text = buttonName;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)