读书人

小弟有几个 C#的有关问题请问!

发布时间: 2012-01-08 22:48:50 作者: rapoo

小弟有几个 C#的问题请教!急!急!急!
1. 在.net(C# or vb.net)中需要进行哪些操作才能使用自定义类库。假设,自定义类库的动态连接库文件为CustListBox.dll,类库的命名空间是Custom。
2.(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)
{
//}


[解决办法]
帮顶!
[解决办法]
第一题答案:

1 在项目上点击右键,选择“添加引用”,选择“浏览”标签,找到 CustListBox.dll 后一路确定既可。

2 在需要该引用的文件顶部写上
using Custom;

3 通过类名调用相应的类既可!


第二题交白卷,哈

[解决办法]
第一题的答案,上面的老兄说的很清楚了,另外就是,根据你自己引入类的实际情况进行实例化.
第二题没明白你的意思,答案无从说起.

读书人网 >C#

热点推荐