C#C
C#3y ago
mario12136

Move Line Up in C# TextBox like in VS

I am working on a Notepad clone and I want to create the move line up/down feature that is so common in editors. I believe in VS it is Alt+Up/Alt+Down. I was wondering how can I do this, or if someone has done it before, if you don't mind sharing your code. I might probably have to remove the current line's content and then insert it at a higher line index but what if there is already a non-empty line above? Would appreciate help on this.
Was this page helpful?