当前位置: 首页>>代码示例>>C#>>正文


C# System.Byte类代码示例

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


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

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


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