Search code examples
c#fileimporttfs-2015wiql

How to read content from a *.wiq file with C#


As the title says i want to read all text from a .wiq file as a String in C#. Is it possible somehow? Because the normal StreamReader only works for .txt!


Solution

  • This works for me.

    using( System.IO.StreamReader sr = new System.IO.StreamReader(@"C:\temp\queryName.wiq") )
    {
        string allLines = sr.ReadToEnd();
    }