生成DLL文件

编写DLL服务端程序
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
6
namespace DLL服务端程序
7

{
8
public class Class1
9
{
10
public Class1()
11
{
12
//todo
13
14
}
15
16
public string GetChinese(double DataInput, bool DisplayZero)
17
{
18
string[] StrScale =
{ "分", "角", "元", "拾", "佰", "仟", "万", "拾", "佰", "仟", "亿", "拾", "佰", "仟", "兆", "拾", "佰", "仟" };
19
string[] StrNumber =
{ "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" };
20
string Temp = DataInput.ToString();
21
//去掉小数点
22
string StrTemp = Temp.Replace(".", "");
23
string StrResult = "";
24
for (int i = StrTemp.Length; i > 0; i--)
25
{
26
StrResult += StrNumber[Convert.ToInt16(StrTemp[StrTemp.Length - i].ToString())];
27
StrResult += StrScale[i - 1];
28
}
29
30
return StrResult;
31
32
33
}
34
//
35
}
36
}
posted @
2009-11-08 15:34
doze
阅读(
203)
评论()
收藏
举报