TextFile Constructors ​
Overloads ​
| Name | Description |
|---|---|
TextFile(FileInfo) | Initialises a new instance of the TextFile class from a file on disk. |
TextFile(String, Stream) | Initialises a new instance of the TextFile class from a Stream containing the file. |
TextFile(String, String) | Initialises a new instance of the BinaryFile class from a string containing the file. |
TextFile(FileInfo) ​
Initialises a new instance of the TextFile class from a file on disk.
c#
public TextFile(FileInfo file);Parameters ​
| Name | Type | Description |
|---|---|---|
file | FileInfo | A FileInfo with details a file on disk to load. The FullName will be used for Name. |
TextFile(String, Stream) ​
Initialises a new instance of the TextFile class from a Stream containing the file.
c#
public TextFile(string name, Stream text);Parameters ​
| Name | Type | Description |
|---|---|---|
name | String | The name of the file. |
text | Stream | A Stream containing the file. The stream will be read to the end and left open. |
TextFile(String, String) ​
Initialises a new instance of the BinaryFile class from a string containing the file.
c#
public TextFile(string name, string text);Parameters ​
| Name | Type | Description |
|---|---|---|
name | String | The name of the file. |
text | String | The contents of the file. |