I have a console app and I already changed the Console.Out.NewLine = "\r\n\r\n";
but now I would like to change the left margin, the cursor position in all my app just one time, ´cause I repeat Console.SetCursorPosition
many times. Is it possible? Thanks.
Asked
Active
Viewed 1,431 times
0

Priscila
- 301
- 4
- 19
-
You might also like to take a look at the log4net project, although that might be overkill for what you're doing. – Matthew Strawbridge Mar 31 '13 at 10:46
1 Answers
3
you can use use \t
for left margin, you can check here more escape character in c#.
Console.WriteLine("\t\t\t text with left margin");

Mohammad Arshad Alam
- 9,694
- 6
- 38
- 61
-
3This would require OP to change *every* logging statement. I think Lindsay wanted to change the left margin globally with a single method call. (But then this *has* been accepted as the answer, so who knows?) – Matthew Strawbridge Mar 31 '13 at 10:51