Skip to content

9eb7f523 293b 76f8 8ffe cbc8e1cd6de3

Arthur Frederico Neves edited this page Jul 19, 2016 · 3 revisions

BasePack.GetString Method

Converts a part of the inner buffer, started in readPosition, to a string.

Namespace: NETLIB
Assembly: NETLIB (in NETLIB.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#

public virtual string GetString()

VB

Public Overridable Function GetString As String

C++

public:
virtual String^ GetString()

F#

abstract GetString : unit -> string 
override GetString : unit -> string 

Return Value

Type: String
String converted from the inner buffer started in readPosition.

Exceptions

 

Exception Condition
FormatException Throws when the length of the string read from the inner buffer is bigger than the remaining bytes in the inner buffer
IndexOutOfRangeException Throws when readPosition is larger than the inner buffer length minus sizeof(int).

Remarks

First it reads an integer from the inner buffer, that refers to the lenght of the string. Then reads the chars one by one from the inner buffer and put them in a string.

See Also

Reference

BasePack Class
GetString Overload
NETLIB Namespace

Clone this wiki locally