String.Format: join two value in one padding <p>How can I do something like</p> <pre><code>string.Format("({{0}{1},10})", "ABC", "DEF) // ( ABCDEF) string.Format("({{0} {1},10})", "ABC", "DEF) // ( ABC DEF) </code></pre> <p><img src="https://i.stack.imgur.com/4zMI3.png" alt="Example"></p> <p>I have to solve tihs operation with format. And I do not have a chance to combine elsewhere.</p> <p>So is not it possible to do something like.</p> <pre><code>Console.WriteLine(string.Format("({0,10})", "ABC" + " DEF")); </code></pre> <p>I cant use join or concat or a + b methods</p> <p><strong>Why i want only format pattern?</strong> Because of usage like this.</p> <pre><code>//Dummy metod for example public static string applyFormat(String format, String values, Object object ) { member1 = reflect from object by named extracted string member2 = reflect from object by named extracted string or members[]= exploded string return String.Format(format, member1, member2); or return String.Format(format, members); } </code></pre> <p>Usage example</p> <pre><code> Console.WriteLine(applyFormat("({ {0}{1},-10})", "Member1,Member2", object)); // "({ {0}{1},-10})": Reflect and Join Member1 and Member2 and apply padding joined value </code></pre> <p>Thanks</p>