Home > DeveloperSection > Forums > Compare text file contents to a string variable using C#
Aaron Douglas
Aaron Douglas

Total Post:20

Points:140
Posted on    October-16-2013 7:23 AM

 C# C# 
Ratings:


 1 Reply(s)
 1188  View(s)
Rate this:

How can I compare a text file contents to a string variable using c#



Hugh Jackman
Hugh Jackman

Total Post:52

Points:366
Posted on    October-16-2013 8:01 AM

var fileContents = File.ReadAllText(fileName);
return testString == filecontents;

Don't want to miss updates? Please click the below button!

Follow MindStick