Host To Network Bytes - CSharp System

CSharp examples for System:Byte Array

Description

Host To Network Bytes

Demo Code

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

public class Main{
        public static void HostToNetworkBytes(this ushort host, byte[] bytes, int index)
        {//  www .j a  va2 s . co m
            bytes[index] = (byte)(host >> 8);
            bytes[index + 1] = (byte)host;
        }
}

Related Tutorials