• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# System.Byte类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Byte的典型用法代码示例。如果您正苦于以下问题:C# System.Byte类的具体用法?C# System.Byte怎么用?C# System.Byte使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



System.Byte类属于命名空间,在下文中一共展示了System.Byte类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Deserialize

 public override int Deserialize(System.Byte[] serialized, int startIndex)
 {
     int curIndex = startIndex;
     data = serialized[curIndex];
     curIndex++;
     return (curIndex - startIndex);
 }
开发者ID:WPI-ARC,项目名称:Kinect2ROS,代码行数:7,代码来源:Char.cs


示例2: Serialize

 public override void Serialize(MemoryStream stream)
 {
     System.Byte[] type_bytes = new System.Byte[] {type};
     stream.Write(type_bytes, 0, type_bytes.Length);
     System.Byte[] id_bytes = new System.Byte[] {id};
     stream.Write(id_bytes, 0, id_bytes.Length);
     System.Byte[] intensity_bytes = BitConverter.GetBytes(intensity);
     stream.Write(intensity_bytes, 0, intensity_bytes.Length);
 }
开发者ID:WPI-ARC,项目名称:kinect2_interface,代码行数:9,代码来源:JoyFeedback.cs


示例3: Serialize

 public override void Serialize(MemoryStream stream)
 {
     goal_id.Serialize(stream);
     System.Byte[] status_bytes = new System.Byte[] {status};
     stream.Write(status_bytes, 0, status_bytes.Length);
     System.Byte[] text_bytes = System.Text.Encoding.UTF8.GetBytes(text);
     System.Byte[] text_len_bytes = BitConverter.GetBytes((System.UInt32)text_bytes.Length);
     stream.Write(text_len_bytes, 0, text_len_bytes.Length);
     stream.Write(text_bytes, 0, text_bytes.Length);
 }
开发者ID:WPI-ARC,项目名称:kinect2_interface,代码行数:10,代码来源:GoalStatus.cs


示例4: Image

 public Image()
 {
     header = new std_msgs.Header();
     height = 0;
     width = 0;
     encoding = "";
     is_bigendian = 0;
     step = 0;
     data = new List<System.Byte>();
 }
开发者ID:WPI-ARC,项目名称:Kinect2ROS,代码行数:10,代码来源:Image.cs


示例5: Deserialize

 public override int Deserialize(System.Byte[] serialized, int startIndex)
 {
     int curIndex = startIndex;
     type = serialized[curIndex];
     curIndex++;
     id = serialized[curIndex];
     curIndex++;
     intensity = BitConverter.ToSingle(serialized, curIndex);
     curIndex += BitConverter.GetBytes(intensity).Length;
     return (curIndex - startIndex);
 }
开发者ID:WPI-ARC,项目名称:kinect2_interface,代码行数:11,代码来源:JoyFeedback.cs


示例6: Deserialize

 public override int Deserialize(System.Byte[] serialized, int startIndex)
 {
     int curIndex = startIndex;
     System.UInt32 CompressedMessageData_len = BitConverter.ToUInt32(serialized, curIndex);
     curIndex += BitConverter.GetBytes(CompressedMessageData_len).Length;
     System.Byte[] temp = new System.Byte[CompressedMessageData_len];
     Array.Copy(serialized, curIndex, temp, 0, CompressedMessageData_len);
     CompressedMessageData = temp.ToList();
     curIndex += (int)CompressedMessageData_len;
     return (curIndex - startIndex);
 }
开发者ID:WPI-ARC,项目名称:kinect2_interface,代码行数:11,代码来源:CompressedMessage.cs


示例7: Deserialize

 public override int Deserialize(System.Byte[] serialized, int startIndex)
 {
     int curIndex = startIndex;
     curIndex += goal_id.Deserialize(serialized, curIndex);
     status = serialized[curIndex];
     curIndex++;
     System.UInt32 text_len = BitConverter.ToUInt32(serialized, curIndex);
     curIndex += BitConverter.GetBytes(text_len).Length;
     text = System.Text.Encoding.UTF8.GetString(serialized, curIndex, (int)text_len);
     curIndex += (int)text_len;
     return (curIndex - startIndex);
 }
开发者ID:WPI-ARC,项目名称:kinect2_interface,代码行数:12,代码来源:GoalStatus.cs


示例8: Deserialize

 public override int Deserialize(System.Byte[] serialized, int startIndex)
 {
     int curIndex = startIndex;
     curIndex += layout.Deserialize(serialized, curIndex);
     System.UInt32 data_len = BitConverter.ToUInt32(serialized, curIndex);
     curIndex += BitConverter.GetBytes(data_len).Length;
     System.Byte[] temp = new System.Byte[data_len];
     Array.Copy(serialized, curIndex, temp, 0, data_len);
     data = temp.ToList();
     curIndex += (int)data_len;
     return (curIndex - startIndex);
 }
开发者ID:WPI-ARC,项目名称:kinect2_interface,代码行数:12,代码来源:UInt8MultiArray.cs


示例9: Serialize

 public override void Serialize(MemoryStream stream)
 {
     System.Byte[] name_bytes = System.Text.Encoding.UTF8.GetBytes(name);
     System.Byte[] name_len_bytes = BitConverter.GetBytes((System.UInt32)name_bytes.Length);
     stream.Write(name_len_bytes, 0, name_len_bytes.Length);
     stream.Write(name_bytes, 0, name_bytes.Length);
     System.Byte[] offset_bytes = BitConverter.GetBytes(offset);
     stream.Write(offset_bytes, 0, offset_bytes.Length);
     System.Byte[] datatype_bytes = new System.Byte[] {datatype};
     stream.Write(datatype_bytes, 0, datatype_bytes.Length);
     System.Byte[] count_bytes = BitConverter.GetBytes(count);
     stream.Write(count_bytes, 0, count_bytes.Length);
 }
开发者ID:WPI-ARC,项目名称:kinect2_interface,代码行数:13,代码来源:PointField.cs


示例10: CompressedPointCloud2

 public CompressedPointCloud2()
 {
     header = new std_msgs.Header();
     height = 0;
     width = 0;
     fields = new List<sensor_msgs.PointField>();
     is_bigendian = false;
     point_step = 0;
     row_step = 0;
     compression_type = 0;
     compressed_data = new List<System.Byte>();
     is_dense = false;
 }
开发者ID:WPI-ARC,项目名称:kinect2_interface,代码行数:13,代码来源:CompressedPointCloud2.cs


示例11: Serialize

 public override void Serialize(MemoryStream stream)
 {
     header.Serialize(stream);
     System.Byte[] radiation_type_bytes = new System.Byte[] {radiation_type};
     stream.Write(radiation_type_bytes, 0, radiation_type_bytes.Length);
     System.Byte[] field_of_view_bytes = BitConverter.GetBytes(field_of_view);
     stream.Write(field_of_view_bytes, 0, field_of_view_bytes.Length);
     System.Byte[] min_range_bytes = BitConverter.GetBytes(min_range);
     stream.Write(min_range_bytes, 0, min_range_bytes.Length);
     System.Byte[] max_range_bytes = BitConverter.GetBytes(max_range);
     stream.Write(max_range_bytes, 0, max_range_bytes.Length);
     System.Byte[] range_bytes = BitConverter.GetBytes(range);
     stream.Write(range_bytes, 0, range_bytes.Length);
 }
开发者ID:WPI-ARC,项目名称:Kinect2ROS,代码行数:14,代码来源:Range.cs


示例12: Deserialize

 public override int Deserialize(System.Byte[] serialized, int startIndex)
 {
     int curIndex = startIndex;
     System.UInt32 name_len = BitConverter.ToUInt32(serialized, curIndex);
     curIndex += BitConverter.GetBytes(name_len).Length;
     name = System.Text.Encoding.UTF8.GetString(serialized, curIndex, (int)name_len);
     curIndex += (int)name_len;
     offset = BitConverter.ToUInt32(serialized, curIndex);
     curIndex += BitConverter.GetBytes(offset).Length;
     datatype = serialized[curIndex];
     curIndex++;
     count = BitConverter.ToUInt32(serialized, curIndex);
     curIndex += BitConverter.GetBytes(count).Length;
     return (curIndex - startIndex);
 }
开发者ID:WPI-ARC,项目名称:kinect2_interface,代码行数:15,代码来源:PointField.cs


示例13: Deserialize

 public override int Deserialize(System.Byte[] serialized, int startIndex)
 {
     int curIndex = startIndex;
     curIndex += header.Deserialize(serialized, curIndex);
     System.UInt32 format_len = BitConverter.ToUInt32(serialized, curIndex);
     curIndex += BitConverter.GetBytes(format_len).Length;
     format = System.Text.Encoding.UTF8.GetString(serialized, curIndex, (int)format_len);
     curIndex += (int)format_len;
     System.UInt32 data_len = BitConverter.ToUInt32(serialized, curIndex);
     curIndex += BitConverter.GetBytes(data_len).Length;
     System.Byte[] temp = new System.Byte[data_len];
     Array.Copy(serialized, curIndex, temp, 0, data_len);
     data = temp.ToList();
     curIndex += (int)data_len;
     return (curIndex - startIndex);
 }
开发者ID:WPI-ARC,项目名称:kinect2_interface,代码行数:16,代码来源:CompressedImage.cs


示例14: Deserialize

 public override int Deserialize(System.Byte[] serialized, int startIndex)
 {
     int curIndex = startIndex;
     curIndex += header.Deserialize(serialized, curIndex);
     radiation_type = serialized[curIndex];
     curIndex++;
     field_of_view = BitConverter.ToSingle(serialized, curIndex);
     curIndex += BitConverter.GetBytes(field_of_view).Length;
     min_range = BitConverter.ToSingle(serialized, curIndex);
     curIndex += BitConverter.GetBytes(min_range).Length;
     max_range = BitConverter.ToSingle(serialized, curIndex);
     curIndex += BitConverter.GetBytes(max_range).Length;
     range = BitConverter.ToSingle(serialized, curIndex);
     curIndex += BitConverter.GetBytes(range).Length;
     return (curIndex - startIndex);
 }
开发者ID:WPI-ARC,项目名称:Kinect2ROS,代码行数:16,代码来源:Range.cs


示例15: Deserialize

 public override int Deserialize(System.Byte[] serialized, int startIndex)
 {
     int curIndex = startIndex;
     System.UInt32 TopicName_len = BitConverter.ToUInt32(serialized, curIndex);
     curIndex += BitConverter.GetBytes(TopicName_len).Length;
     TopicName = System.Text.Encoding.UTF8.GetString(serialized, curIndex, (int)TopicName_len);
     curIndex += (int)TopicName_len;
     System.UInt32 TopicType_len = BitConverter.ToUInt32(serialized, curIndex);
     curIndex += BitConverter.GetBytes(TopicType_len).Length;
     TopicType = System.Text.Encoding.UTF8.GetString(serialized, curIndex, (int)TopicType_len);
     curIndex += (int)TopicType_len;
     System.UInt32 SerializedMessageData_len = BitConverter.ToUInt32(serialized, curIndex);
     curIndex += BitConverter.GetBytes(SerializedMessageData_len).Length;
     System.Byte[] temp = new System.Byte[SerializedMessageData_len];
     Array.Copy(serialized, curIndex, temp, 0, SerializedMessageData_len);
     SerializedMessageData = temp.ToList();
     curIndex += (int)SerializedMessageData_len;
     return (curIndex - startIndex);
 }
开发者ID:WPI-ARC,项目名称:kinect2_interface,代码行数:19,代码来源:SerializedMessage.cs


示例16: Serialize

 public override void Serialize(MemoryStream stream)
 {
     header.Serialize(stream);
     System.Byte[] ActiveTracks_bytes = BitConverter.GetBytes(ActiveTracks);
     stream.Write(ActiveTracks_bytes, 0, ActiveTracks_bytes.Length);
     System.Byte[] TotalTracks_bytes = BitConverter.GetBytes(TotalTracks);
     stream.Write(TotalTracks_bytes, 0, TotalTracks_bytes.Length);
     System.Byte[] Tracks_len_bytes = BitConverter.GetBytes((System.UInt32)Tracks.Count);
     stream.Write(Tracks_len_bytes, 0, Tracks_len_bytes.Length);
     foreach(person_tracker.TrackedPerson element in Tracks)
     {
         element.Serialize(stream);
     }
     System.Byte[] TrackerType_bytes = new System.Byte[] {TrackerType};
     stream.Write(TrackerType_bytes, 0, TrackerType_bytes.Length);
     System.Byte[] TrackerName_bytes = System.Text.Encoding.UTF8.GetBytes(TrackerName);
     System.Byte[] TrackerName_len_bytes = BitConverter.GetBytes((System.UInt32)TrackerName_bytes.Length);
     stream.Write(TrackerName_len_bytes, 0, TrackerName_len_bytes.Length);
     stream.Write(TrackerName_bytes, 0, TrackerName_bytes.Length);
 }
开发者ID:WPI-ARC,项目名称:Kinect2ROS,代码行数:20,代码来源:TrackerState.cs


示例17: Serialize

 public override void Serialize(MemoryStream stream)
 {
     header.Serialize(stream);
     System.Byte[] height_bytes = BitConverter.GetBytes(height);
     stream.Write(height_bytes, 0, height_bytes.Length);
     System.Byte[] width_bytes = BitConverter.GetBytes(width);
     stream.Write(width_bytes, 0, width_bytes.Length);
     System.Byte[] encoding_bytes = System.Text.Encoding.UTF8.GetBytes(encoding);
     System.Byte[] encoding_len_bytes = BitConverter.GetBytes((System.UInt32)encoding_bytes.Length);
     stream.Write(encoding_len_bytes, 0, encoding_len_bytes.Length);
     stream.Write(encoding_bytes, 0, encoding_bytes.Length);
     System.Byte[] is_bigendian_bytes = new System.Byte[] {is_bigendian};
     stream.Write(is_bigendian_bytes, 0, is_bigendian_bytes.Length);
     System.Byte[] step_bytes = BitConverter.GetBytes(step);
     stream.Write(step_bytes, 0, step_bytes.Length);
     System.Byte[] data_bytes = data.ToArray();
     System.Byte[] data_len_bytes = BitConverter.GetBytes((System.UInt32)data_bytes.Length);
     stream.Write(data_len_bytes, 0, data_len_bytes.Length);
     stream.Write(data_bytes, 0, data_bytes.Length);
 }
开发者ID:WPI-ARC,项目名称:Kinect2ROS,代码行数:20,代码来源:Image.cs


示例18: Save

        public void Save(System.String fileName)
        {
            System.Int32 bufferLength = 16*(BARanges.Count+1);
            for (System.Int32 i=0;i<BARanges.Count;i++)
                bufferLength+= BARanges[i][1];

            System.Byte[] outputBuffer = new System.Byte[bufferLength];
            System.Array.Copy(System.Text.Encoding.ASCII.GetBytes("BARDMA"), 0, outputBuffer, 0, 6);
            System.Array.Copy(System.BitConverter.GetBytes(BARanges.Count), 0, outputBuffer, 8, 4);
            for (System.Int32 i=0;i<BARanges.Count;i++)
            {
                System.Array.Copy(System.Text.Encoding.ASCII.GetBytes(rangesNames[i]), 0, outputBuffer, 0x10+i*0x10, 4);
                System.Int32 currOffset = i==0?0x10+BARanges.Count*0x10:
                                                       System.BitConverter.ToInt32(new System.Byte[] {
                                                                                   	outputBuffer[0x4+i*0x10],
                                                                                   	outputBuffer[0x5+i*0x10],
                                                                                   	outputBuffer[0x6+i*0x10],
                                                                                   	outputBuffer[0x7+i*0x10]},0)+
                                                       System.BitConverter.ToInt32(new System.Byte[] {
                                                                                   	outputBuffer[0x8+i*0x10],
                                                                                   	outputBuffer[0x9+i*0x10],
                                                                                   	outputBuffer[0xA+i*0x10],
                                                                                   	outputBuffer[0xB+i*0x10]},0);
                System.Array.Copy(System.BitConverter.GetBytes(currOffset),0, outputBuffer, 0x14+i*0x10, 4);
                System.Array.Copy(System.BitConverter.GetBytes(BARanges[i][1]), 0, outputBuffer, 0x18+i*0x10, 4);
                System.Array.Copy(System.BitConverter.GetBytes(BARanges[i][0]), 0, outputBuffer, 0x1C+i*0x10, 4);
                System.Byte[] curBuffer = new System.Byte[BARanges[i][1]];
                System.Array.Copy(DMAbuffer,BARanges[i][0],curBuffer,0,BARanges[i][1]);
                System.Array.Copy(curBuffer, 0, outputBuffer, currOffset, curBuffer.Length);
            }
            try
            {
                System.IO.File.WriteAllBytes(fileName,outputBuffer);
            }
            catch (System.UnauthorizedAccessException)
            {

            }
        }
开发者ID:GovanifY,项目名称:Teamod,代码行数:39,代码来源:DMABAR.cs


示例19: Serialize

 public override void Serialize(MemoryStream stream)
 {
     System.Byte[] data_bytes = new System.Byte[] {data};
     stream.Write(data_bytes, 0, data_bytes.Length);
 }
开发者ID:WPI-ARC,项目名称:Kinect2ROS,代码行数:5,代码来源:Char.cs


示例20: PointField

 public PointField()
 {
     name = "";
     offset = 0;
     datatype = 0;
     count = 0;
 }
开发者ID:WPI-ARC,项目名称:kinect2_interface,代码行数:7,代码来源:PointField.cs



注:本文中的System.Byte类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# System.Collections类代码示例发布时间:2022-05-24
下一篇:
C# System.Action类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap