Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Indenting C# String Data with Tabs
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StringIndent
{
public class StringIndent
{
public static void main()
{
// Left Align
Console.WriteLine(""{0,-10}\t{1,-5}\t{2,-5}\t{3,-10}"", var1, var2, var3, var4);
// Right Align
Console.WriteLine(""{0,10}\t{1,5}\t{2,5}\t{3,10}"", var1, var2, var3, var4);
// Amount of padding must be set to the longest possible value of var1, var2 etc...
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.