Read short from byte array

image_pdfimage_print

//http://walkmen.codeplex.com/license
// License: GNU General Public License version 2 (GPLv2)

using System;
using System.Collections.Generic;
using System.Text;

namespace Walkmen.Util
{
public sealed class NumericUtils
{
private NumericUtils()
{
}

public static short ReadShort(byte[] buffer, int offset)
{
return (short)((buffer[offset + 0] << 8) + buffer[offset + 1]); } } } [/csharp]

This entry was posted in Data Types. Bookmark the permalink.