Hi I have string str="1010101010101010" comes from file.txt which contains exactly 16 signs: 0 and 1.This is only an example and str can have more than 16 signs: 8,16,24,32,40... I want to save it to file.bin. After saving file.bin must have size 2B(in this example). I tried to use
File.WriteAllText(path, str);
but my file is bigger than i want. Can someone help me?