This snippet of code demonstrates how to create binary data files in C#. The code first checks to see if the file has already been created. If not, it creates a new file and populates it with data. / Make a new, blank data file. Console. Create the data writer with WriteLine (fileName + " already exists!");