Skip to content

Instantly share code, notes, and snippets.

@airbreather
Last active August 29, 2015 14:21
Show Gist options
  • Save airbreather/fe0b2b87f08749e01de9 to your computer and use it in GitHub Desktop.
Save airbreather/fe0b2b87f08749e01de9 to your computer and use it in GitHub Desktop.
using System;
using System.Globalization;
using System.Threading;
namespace ConsoleApplication1
{
internal static class Program
{
private static void Main()
{
int[] valuesToJoin = { 1, 5, -42, Int32.MinValue };
string joined = String.Join(";", valuesToJoin);
// writes: 1;5;-42;-2147483648
Console.WriteLine(joined);
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US") { NumberFormat = { NegativeSign = "8" } };
// writes: 1;5;842;82147483648
joined = String.Join(";", valuesToJoin);
Console.WriteLine(joined);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment