How could I encode a string of 1s and 0s for transport?

后端 未结 5 1795
后悔当初
后悔当初 2020-12-21 12:02

For a genetic algorithm application, I\'m using a whole load of binary strings. Most of the time they literally take the form of 01001010110, so that they can b

5条回答
  •  温柔的废话
    2020-12-21 12:24

    What about converting it to it's base 10 integer equivalent?

    int myBin = Convert.ToInt32("01001010110", 2);
    

    Convert.ToInt32() documentation

提交回复
热议问题