Click or drag to resize

ExtensionsFileIOReadTextAsync Method (DirectoryInfo, String)

Reads the contents of the specified file and returns text.

Namespace:  Cauldron
Assembly:  Cauldron (in Cauldron.dll) Version: 3.2.0.2
Syntax
public static Task<string> ReadTextAsync(
	this DirectoryInfo folder,
	string filename
)

Parameters

folder
Type: System.IODirectoryInfo
The folder where the file resides
filename
Type: SystemString
The name of the file to read.

Return Value

Type: TaskString
When this method completes successfully, it returns the contents of the file as a text string.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DirectoryInfo. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also