Maybe something like:
FileStream fileStream = new FileStream("[path]", FileMode.Open, FileAccess.Read, FileShare.Read, 64 * 1024,
(FileOptions)0x20000000 | FileOptions.WriteThrough & FileOptions.SequentialScan);
string fileContents;
using (StreamReader reader = new StreamReader(fileStream))
{
fileContents = reader.ReadToEnd();
}
bool assignedvariable = Convert.ToBoolean(fileContents);
assignedvariable will hold true if the file contains 1 and false if it contains 0.
Sorry if this has been answered already people post very fast here.