-2

I'm looking for a function that will convert "10011101.11001001.01001100.00000000" to "157.201.76.0"

Kirito Kazuto
  • 23
  • 1
  • 6

1 Answers1

1
string ip = string.Join(".",
    "10011101.11001001.01001100.00000000"
    .Split('.')
    .Select(x => Convert.ToInt32(x, 2).ToString(CultureInfo.InvariantCulture))
);
AlexD
  • 32,156
  • 3
  • 71
  • 65