Here is a C# version
public static int binaryArrayToNumber(int a)
return Convert.ToInt32(a.Aggregate("", (acc, n) => acc + n.ToString()), 2);
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.