/// <summary> /// Gets the key's value in bytes. /// </summary> /// <returns></returns> public byte[] AsBytes() { AssertTypeSafe(GribValueType.Bytes); SizeT sz = 0; GribApiProxy.GribGetSize(_handle, Key, ref sz); byte[] bytes = new byte[sz]; GribApiProxy.GribGetBytes(_handle, Key, bytes, ref sz); return(bytes); }