fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. using System.IO;
  7.  
  8. namespace CS_tests
  9. {
  10. class Class1
  11. {
  12.  
  13. static void Main(string[] args)
  14. {
  15.  
  16. string textRead;
  17. string path = @"driverData.txt";
  18.  
  19. if (File.Exists(path))
  20. {
  21. textRead = File.ReadAllText(path);
  22. }
  23.  
  24. for (int i = 0; i < testRead.Length; i++)
  25. {
  26. Console.WriteLine(testRead[i]);
  27. }
  28. string w = Console.ReadLine();
  29.  
  30. }
  31. }
  32. }
  33.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(24,33): error CS0103: The name `testRead' does not exist in the current context
prog.cs(26,35): error CS0103: The name `testRead' does not exist in the current context
prog.cs(28,20): warning CS0219: The variable `w' is assigned but its value is never used
Compilation failed: 2 error(s), 1 warnings
stdout
Standard output is empty