3
Reply

Write data to txt file without rewritting

diamond diamond

diamond diamond

Sep 30 2013 4:11 PM
888
Hi,

I have a code, same as below:
I define it in globally :

        TextWriter file = new StreamWriter("C:\\Hello.txt", true);


this give an error 
for (i=0;i<100;i++)
{
double FPRate = (double)FP1.Count() / (FP1.Count() + TN1.Count()) * 100;
            double DetectionRate = (double)TP1.Count() / (TP1.Count() + FN1.Count()) * 100;
            file.Write(FPRate);
            file.Close();

Answers (3)