what is the printf in C# [duplicate]
问题 This question already has answers here : sprintf in C#? (3 answers) Closed 4 years ago . I want to know what to use in C# to format my output in my console window I tried to use \t but it did not work I know there is printf in C to format my output check this image https://s15.postimg.cc/94fstpi2z/Console.png 回答1: There is no direct "printf" duplication in C#. You can use PInvoke to call it from a C library. However there is Console.WriteLine("args1: {0} args2: {1}", value1, value2); Or