2014年3月12日水曜日

C#で9DRの計算

/// 
/// 9DR 計算
/// NW-7
/// 
/// /// 
public static string Get9DR(string Value)
{
    bool result = Regex.IsMatch(Value, @"^[0-9]+$");
    if (!result)
    {
        return null;
    }

    return (ulong.Parse(Value) % 9).ToString();
}

0 件のコメント:

コメントを投稿