Mono.DataConverter.CopyConverter.GetInt16 C# (CSharp) Method

GetInt16() public method

public GetInt16 ( byte data, int index ) : short
data byte
index int
return short
			public override short GetInt16 (byte [] data, int index)
			{
				if (data == null)
					throw new ArgumentNullException ("data");
				if (data.Length - index < 2)
					throw new ArgumentException ("index");
				if (index < 0)
					throw new ArgumentException ("index");

				short ret;
				byte *b = (byte *)&ret;

				for (int i = 0; i < 2; i++)
					b [i] = data [index+i];

				return ret;
			}