Encoder.GetByteCount Method (Char*, Int32, Boolean)

This member can be used only by trusted applications. If you try to use this member in a partial-trust application, your code will throw a MethodAccessException exception. This member is security-critical, which restricts its use.
[SECURITY CRITICAL]

When overridden in a derived class, calculates the number of bytes produced by encoding a set of characters starting at the specified character pointer. A parameter indicates whether to clear the internal state of the encoder after the calculation.

This API is not CLS-compliant. 

Namespace:  System.Text
Assembly:  mscorlib (in mscorlib.dll)

[ComVisibleAttribute(false)]
[SecurityCriticalAttribute]
[CLSCompliantAttribute(false)]
public virtual int GetByteCount(
	char* chars,
	int count,
	bool flush
)

Parameters

chars
Type: System.Char*
A pointer to the first character to encode.
count
Type: System.Int32
The number of characters to encode.
flush
Type: System.Boolean
true to simulate clearing the internal state of the encoder after the calculation; otherwise, false.

Return Value

Type: System.Int32
The number of bytes produced by encoding the specified characters and any characters in the internal buffer.

Silverlight

Supported in: 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: