// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; namespace E { public static class MyExtensions { public static string ToMyFunkyString(this int v) { byte[] b = BitConverter.GetBytes(v); return string.Format("{0:X2}.{1:X2}.{2:X2}_{3:X2}", b[0], b[1], b[2], b[3]); } } public class Program { public static void Main(string[] args) { int v = 0x15000000; Console.WriteLine(v.ToMyFunkyString()); } } }