harish reddy

harish reddy

  • NA
  • 162
  • 33.6k

Alignment question

Jun 9 2017 12:15 AM
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)