I'm trying to build a very simple text/code editer, and I want to keep the indent from the last line typed. So I need a way to carry over the indent from the last line to this line. For example say I have code like this:
void Method() {
Console.Write("Test");
}
And I want it to look like this:
void Method() {
Console.Write("Test");
next line of code at the same indent level.
}
How can I do this? Code examples would be nice.
Thanks.
