I was looking into/using PadLeft & PadRight; I came across this code:
public void PadToColumnExample(DTE2 dte)
{
// Create a new text file.
dte.ItemOperations.NewFile(@"General\Text File", "",
Constants.vsViewKindPrimary);
// Create an EditPoint at the start of the new file.
TextDocument doc =
(TextDocument)dte.ActiveDocument.Object("TextDocum ent");
EditPoint point = doc.StartPoint.CreateEditPoint();
// Insert 10 lines of text.
for (int i = 0; i < 10; i++)
point.Insert("This is a test.\n");
point.StartOfDocument();
// Indent text to column 10.
for (int i = 0; i < 10; i++)
{
point.PadToColumn(10);
point.LineDown(1);
point.StartOfLine();
}
}
here:
http://msdn.microsoft.com/ko-kr/libr...mn(VS.80).aspx
What is DTE2?