home
links
tips

code
users
tools
tutorials
projects
web
help
design

mudabone
suletzki
trans48
nutrition reality

MarthaAttire!

file To String


Returns nothing if file isn't found

using System.IO;

          public string fileToString(string sFileName)
          {
               string res = "";

               try
               {
                    StreamReader re = File.OpenText(sFileName);
                    res = re.ReadToEnd();
                    re.Close();
               }
               catch {}

               return res;
          }


back to code


Last Modified 8/20/03 4:52 AM

Hide Tools