2
Answers

Alignment question

harish reddy

harish reddy

7y
209
1
Console.WriteLine( "{0,-6}", -123);
 
This output is giving result -123 and the cursor is not moved by 3 digits.
 
Whereas
 
Console.WriteLine( "{0,6}", -123); 
 
this is gving output -123 after the cursor is moved by 3 digits. 
 
Basically i dont understand in which case "{0,-6}" willl be useful? 

Answers (2)