|
|
这是本人遇到的关于c#的面试题,现在大四,由于没学过,觉得无从下手,请大家帮帮忙,万分感谢。
1。 C#代码实现, 确保windows程序只有1个实例(instance)
2。(C#) 数据类型转换. 填充下列函数体(6分)
// 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)
{
// 答案:
}
|
|