LinePrinter.Write Method

Writes an array or string of characters to the selected printer.

Syntax

To write an array of characters:

public int Write(char[]);
[Visual Basic]
Overloads Public Function Write( _
ByVal chars As Char() _
) As Integer
 
[C#]
public int Write(
char[] chars
);

To write a character string:

public int Write(string);
[Visual Basic]
Overloads Public Function Write( _
ByVal str As String _
) As Integer
 
[C#]
public int Write(
string str
);

To write an array of bytes to an internal print buffer for printing:

public int Write(byte[])
[Visual Basic]
Overloads Public Function Write( _
ByVal bytes As Byte() _
) As Integer
 
[C#]
public int Write(
byte[] bytes );

Parameters

chars
A character array to be sent to the buffer for printing.

str
A character string to be printed.

bytes
An array to be sent to the buffer for printing.

Return Values

Positive return indicates that the text was sent.

Negative value indicates that the method was called before Open, or after Close or Cancel.

Remarks

NewLine must be called to send the internal print buffer to the printer. The buffer will also be sent to the printer if there is a danger of an overflow condition.

Exceptions

LinePrinterExceptions

More Information

LinePrinter Class