数字变成英文 - NumberToEn
2017-02-26 15:51:39 访问(1353) 赞(0) 踩(0)
-
/// <summary>
/// 数字变成英文 - NumberToEn
/// </summary>
/// <param name="iNumber"></param>
/// <returns></returns>
public static string NumberToEn(int iNumber)
{
switch (iNumber)
{
case 0:
return CommonWordSlowXFunctionsCommon.Zero;
case 1:
return CommonWordSlowXFunctionsCommon.One;
case 2:
return CommonWordSlowXFunctionsCommon.Two;
case 3:
return CommonWordSlowXFunctionsCommon.Three;
case 4:
return CommonWordSlowXFunctionsCommon.Four;
case 5:
return CommonWordSlowXFunctionsCommon.Five;
case 6:
return CommonWordSlowXFunctionsCommon.Six;
case 7:
return CommonWordSlowXFunctionsCommon.Seven;
case 8:
return CommonWordSlowXFunctionsCommon.Eight;
case 9:
return CommonWordSlowXFunctionsCommon.Nine;
case 10:
return CommonWordSlowXFunctionsCommon.Ten;
case 11:
return CommonWordSlowXFunctionsCommon.Eleven;
case 12:
return CommonWordSlowXFunctionsCommon.Twelve;
case 13:
return CommonWordSlowXFunctionsCommon.Thirteen;
case 14:
return CommonWordSlowXFunctionsCommon.Fourteen;
case 15:
return CommonWordSlowXFunctionsCommon.Fifteen;
case 16:
return CommonWordSlowXFunctionsCommon.Sixteen;
case 17:
return CommonWordSlowXFunctionsCommon.Seventeen;
case 18:
return CommonWordSlowXFunctionsCommon.Eighteen;
case 19:
return CommonWordSlowXFunctionsCommon.Nineteen;
case 20:
return CommonWordSlowXFunctionsCommon.Twenty;
default:
return string.Empty;
}
}
-
using System;
using System.Collections.Generic;
using System.Text;
namespace SlowX.Functions.Common
{
/// <summary>
/// 常用的名称
/// </summary>
public class CommonWordSlowXFunctionsCommon
{
#region 英文
/// <summary>
/// 0
/// </summary>
public const string Zero = "Zero";
/// <summary>
/// 1
/// </summary>
public const string One = "One";
/// <summary>
/// 2
/// </summary>
public const string Two = "Two";
/// <summary>
/// 3
/// </summary>
public const string Three = "Three";
/// <summary>
/// 4
/// </summary>
public const string Four = "Four";
/// <summary>
/// 5
/// </summary>
public const string Five = "Five";
/// <summary>
/// 6
/// </summary>
public const string Six = "Six";
/// <summary>
/// 7
/// </summary>
public const string Seven = "Seven";
/// <summary>
/// 8
/// </summary>
public const string Eight = "Eight";
/// <summary>
/// 9
/// </summary>
public const string Nine = "Nine";
/// <summary>
/// 10
/// </summary>
public const string Ten = "Ten";
/// <summary>
/// 11
/// </summary>
public const string Eleven = "Eleven";
/// <summary>
/// 12
/// </summary>
public const string Twelve = "Twelve";
/// <summary>
/// 13
/// </summary>
public const string Thirteen = "Thirteen";
/// <summary>
/// 14
/// </summary>
public const string Fourteen = "Fourteen";
/// <summary>
/// 15
/// </summary>
public const string Fifteen = "Fifteen";
/// <summary>
/// 16
/// </summary>
public const string Sixteen = "Sixteen";
/// <summary>
/// 17
/// </summary>
public const string Seventeen = "Seventeen";
/// <summary>
/// 18
/// </summary>
public const string Eighteen = "Eighteen";
/// <summary>
/// 19
/// </summary>
public const string Nineteen = "Nineteen";
/// <summary>
/// 20
/// </summary>
public const string Twenty = "Twenty";
/// <summary>
/// 100
/// </summary>
public const string Hundred = "Hundred";
/// <summary>
/// 1000
/// </summary>
public const string Thousand = "Thousand";
/// <summary>
/// 百万
/// </summary>
public const string Million = "Million";
/// <summary>
/// 兆
/// </summary>
public const string Trillion = "Trillion";
#endregion
}
}
标签:
数字变成英文 - NumberToEn 


上一条:
下一条:
相关评论
发表评论