${res:Templates.Project.SharpDevelopMacro.Name}
SharpDevelop
C#.Project.ControlLibrary
C#
${res:Templates.Project.SharpDevelopMacro.Description}
${ProjectName}
]]>
= 0; i--)
b.Append(text[i]);
string newText = b.ToString();
// ensure caret is at start of selection
textArea.Caret.Position = textArea.SelectionManager.SelectionCollection[0].StartPosition;
// deselect text
textArea.SelectionManager.ClearSelection();
// replace the selected text with the new text:
// Replace() takes the arguments: start offset to replace, length of the text to remove, new text
textArea.Document.Replace(textArea.Caret.Offset,
text.Length,
newText);
// Redraw:
textArea.Refresh();
}
}
}
]]>