How to insert a tab character into a string in C#

1 Answer

0 votes
using System;

public class InsertingATab_CSharp
{
    public static void Main(string[] args)
    {
        string FirstName = "Groot";
        int Age = 300;
        
        string result = String.Format("{0}\t{1}", FirstName, Age);
        
        Console.WriteLine(result);
    }
}
 
 
 
/*
run:
     
Groot	300
    
*/

 



answered Jul 3, 2024 by avibootz

Related questions

1 answer 147 views
1 answer 105 views
105 views asked Aug 10, 2023 by avibootz
3 answers 184 views
1 answer 127 views
1 answer 152 views
4 answers 250 views
...