I needed to log the value of a int (camera tracking application). And so i wrote the following function, tried some variation but so far it only logs 1 data sample, while another command in my main app that refreshes a label does frequently update, why wont this work. The following is part of a dll i wrote with all graphic functions. I did complete recompile etc but it doesn't want to dump my int's in a log :(
public static void DumpIntToFile(string filename, int i)
{
StreamWriter sw = System.IO.File.AppendText(filename);
sw.WriteLine(i.ToString());
sw.Close(); // to commit
}
here the label updates but my log doesnt grow
lblMinimumSurfaceSize.Text = Lijst[i].SurfaceSize.ToString();
MagicMath.DumpIntToFile(@"D:\SampleData.txt", Lijst[i].SurfaceSize);