You can use advanced features of string.Format
:
string.Format("{0,-10}{1,-10}{2}", ...)
You can do the same thing by writing str.PadRight(10)
More Related Contents:
- Reversing the given string without using reverse function [closed]
- Iterating through a List and .Contains isn’t catching string [closed]
- Why does Read interfere with ReadLine? [duplicate]
- .NET String.Format() to add commas in thousands place for a number
- Identify if a string is a number
- Easiest way to split a string on newlines in .NET?
- Are string.Equals() and == operator really same? [duplicate]
- How can I strip HTML tags from a string in ASP.NET?
- Convert a list to a string in C#
- Serialize an object to string
- What does $ mean before a string?
- Find text in string with C#
- Replace Multiple String Elements in C#
- Multiple string comparison with C#
- String concatenation vs String Builder. Performance
- Characters in string changed after downloading HTML from the internet
- Getting hash of a list of strings regardless of order
- Easier way of writing null or empty?
- How can I get a character in a string by index?
- What is the difference between .Equals and == [duplicate]
- How do i split a String into multiple values?
- String.Replace ignoring case
- How can I Unescape and Reescape strings in .net?
- What does the @ prefix do on string literals in C#
- String comparison – strA.ToLower()==strB.ToLower() or strA.Equals(strB,StringComparisonType)?
- How can I safely convert a byte array into a string and back? [duplicate]
- Int to string: cannot convert from ‘method group’ to ‘string’ [closed]
- Does any one know of a faster method to do String.Split()?
- Is string actually an array of chars or does it just have an indexer?
- How do i replace accents (german) in .NET