Compartir a través de


TextBuffer.toFile Method

Definition

Overloads

toFile(String)

Saves the content of the TextBuffer object to a file.

toFile(String, Int32)

toFile(String)

Saves the content of the TextBuffer object to a file.

public:
 virtual bool toFile(System::String ^ text1);
public virtual bool toFile (string text1);
abstract member toFile : string -> bool
override this.toFile : string -> bool
Public Overridable Function toFile (text1 As String) As Boolean

Parameters

text1
String

Returns

true if the operation is successful; otherwise, false.

Remarks

If the specified file already exists, it is overwritten without confirmation. If an attacker can control input to the toFile method, a security risk exists. Therefore, this method runs under Code Access Security. Calls to this method on the server require permission from the ExecutePermission class. Make sure that the user has development privileges by setting the security key to SysDevelopment on the control that calls this method.

Applies to

toFile(String, Int32)

public:
 virtual bool toFile(System::String ^ _filename, int _encoding);
public virtual bool toFile (string _filename, int _encoding);
abstract member toFile : string * int -> bool
override this.toFile : string * int -> bool
Public Overridable Function toFile (_filename As String, _encoding As Integer) As Boolean

Parameters

_filename
String
_encoding
Int32

Returns

Applies to