Network Bytes To Host U Int - CSharp System

CSharp examples for System:Int32

Description

Network Bytes To Host U Int

Demo Code

// Copyright (c) Microsoft. All rights reserved.
using System.Diagnostics;

public class Main{
        public static ushort NetworkBytesToHostUInt16(this byte[] bytes, int index)
        {/*w  w w  .j  av a2 s  .c  om*/
            return (ushort)(((ushort)bytes[index] << 8) | (ushort)bytes[index + 1]);
        }
}

Related Tutorials