HtmlTextWriter.Write Method (Char[], Int32, Int32)
Assembly: System.Web (in system.web.dll)
public void Write ( char[] buffer, int index, int count )
public override function Write ( buffer : char[], index : int, count : int )
Not applicable.
Parameters
- buffer
The array of characters from which to write text to the output stream.
- index
The index location in the array where writing begins.
- count
The number of characters to write to the output stream.
This section provides two code examples. The first one demonstrates how to create a character array. The second one demonstrates how to use the array.
These code examples generate the following markup:
<label>
hello
</label>
The following code example shows how to create an array of characters that spell out hello world. Included in the array is the SpaceChar field, which creates a space between the two words.
The following portion of the code example uses the index and count parameters of the Write method to render the first five characters of the array created in the preceding example.