# ReadUShortNetworkByteOrder()

> Reads a 2-byte unsigned short from the current stream in Big-endian byte order and advances the current position of the stream by two bytes. If the current endianness is in little-endian order, the byte order will be swapped.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public ushort ReadUShortNetworkByteOrder()
```

### Returns

| Type                                                           | Description                                                                                           |
| -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| [ushort](https://learn.microsoft.com/dotnet/api/system.uint16) | A 2-byte unsigned short read from the current stream, or 0 if the end of the stream has been reached. |
