SubSonic.Extensions.GetFileText

edit

SubSonic.Extensions.GetFileText

Namespace

Summary== Loads the text from the specified file as a string ==Example==string fileText=SubSonic.Sugar.Files.GetFileText("C:\\MyFile.txt"); ==Unit Test

public void GetFileTextShouldReadTextFromExistingFile() { //sorry for this test string fileText = "C:\testfile.txt".GetFileText(); //it's the only way I can think of to do it Assert.Equal(fileText, "this is a stupid test"); }

Comments

SubSonic 3.0 implements this as an extension on System.String - 2.x uses a static method on SubSonic.Sugar.Files.