(C#) 数据类型转换. 填充下列函数体
// typedef struct
// {
// UINT16 day :5; // years since 1904 (MAC format)
// UINT16 month :4;
// UINT16 year :7;
// } DateType;
//
// Sample; byte[] = 0x90CA -> UInt16 = 0xCA90 -> 1100101 0100 10000 year = 101 month = 4 day =16
// year = 101 + 1904 = 2005 /// <summary>
/// DateType 转换成 代表year month day 的整形数组, 即是分离年,月,日字段
/// </summary>
/// <param name="byteDateType"></param>
/// <returns></returns>
public static int[] DateTypeToDate (byte[] byteDateType)
{
// 答案:
}
// typedef struct
// {
// UINT16 day :5; // years since 1904 (MAC format)
// UINT16 month :4;
// UINT16 year :7;
// } DateType;
//
// Sample; byte[] = 0x90CA -> UInt16 = 0xCA90 -> 1100101 0100 10000 year = 101 month = 4 day =16
// year = 101 + 1904 = 2005 /// <summary>
/// DateType 转换成 代表year month day 的整形数组, 即是分离年,月,日字段
/// </summary>
/// <param name="byteDateType"></param>
/// <returns></returns>
public static int[] DateTypeToDate (byte[] byteDateType)
{
// 答案:
}
解决方案 »
- C#线程池定时器问题,性能优化,高分跪求解决方案
- 运行程序是遇到了问题
- 本人研究“填充 Web 服务的报表的下拉列表”,发现msdn也是错误百出???
- 紧急求助:C#语言、oracle数据库做的小软件,打包运行之后连接数据库失败
- datagridview 里有一列DataGridViewTextBoxColumn,用户可以编辑,在使用完后如何清除
- 能不能从客户端直接将EXCEL 导入到SQL 数据库?具体怎么写,各位大虾帮个忙
- 有什么方法获取页面刷新是由谁触发的?
- 新手学C#遇到点问题。大家帮帮忙
- 一台电脑相同IP的socket通信问题
- c#怎样实现类似delphi中的GetClass函数功能??
- 难道CSDN真的C#.Net方面的没有高手吗?
- C#程序安装必须要求和相应的.NET framework版本对应吗?
xx[1] = (byteDateType[1] & 1) | ( byteDateType[0] >> 5 );
xx[2] = byteDateType[0] & 0x1F;