Sdílet prostřednictvím


Decoder.GetCharCount Method (Byte*, Int32, Boolean)

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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 characters produced by decoding a sequence of bytes starting at the specified byte pointer. A parameter indicates whether to clear the internal state of the decoder after the calculation.

This API is not CLS-compliant. 

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

Syntax

'Declaration
<SecurityCriticalAttribute> _
<CLSCompliantAttribute(False)> _
<ComVisibleAttribute(False)> _
Public Overridable Function GetCharCount ( _
    bytes As Byte*, _
    count As Integer, _
    flush As Boolean _
) As Integer
[SecurityCriticalAttribute]
[CLSCompliantAttribute(false)]
[ComVisibleAttribute(false)]
public virtual int GetCharCount(
    byte* bytes,
    int count,
    bool flush
)

Parameters

  • bytes
    Type: System.Byte*
    A pointer to the first byte to decode.
  • 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 characters produced by decoding the specified sequence of bytes and any bytes in the internal buffer.

Version Information

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

Platforms

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