Gets lowest byte of an unsigned 16 bit integer - CSharp System

CSharp examples for System:Int32

Description

Gets lowest byte of an unsigned 16 bit integer

Demo Code

// Copyright (c) 2013-2015 Laszlo Arvai. All rights reserved.
using System.Threading.Tasks;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System;//from w ww. j  ava  2 s  . com

public class Main{
        #region ? Byte access functions  for UInt16 ?

      /// <summary>
      /// Gets lowest byte of an unsigned 16 bit integer
      /// </summary>
      /// <param name="in_value"></param>
      /// <returns></returns>
      public static byte LowByte(UInt16 in_value)
      {
         return (byte)(in_value & 0xff);
      }
}

Related Tutorials