日期:2014-05-17  浏览次数:21000 次

关于C#公历转农历问题

------解决方案--------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WinForm
{
    class ChineseDate
    {
        private string[] m_strNongLiRiLiBiao;//农历日历表
        private string[] m_strTianGanDiZhiBiao;//天干地支表
        private string m_strShuXiangBiao;//属相表
        private string m_strNongLiYueBiao;//农历月表
        private string m_strNongLiRiBiao;//农历日表
        private int m_iMaxYear;//最大公历年份
        private int m_iMixYear;//最小公历年份

        public ChineseDate()
        {
            #region 农历日历表
            m_strNongLiRiLiBiao = new string[] {
"0100101101101080131",//1900
"0100101011100000219",
"1010010101110000208",
"0101001001101050129",
"1101001001100000216",
"1101100101010000204",
"0110101010101040125",
"0101011010100000213",
"1001101011010000202",
"0100101011101020122",
"0100101011100000210",
"1010010011011060130",
"1010010011010000218",
"1101001001010000206",
"1101010101001050126",
"1011010101010000214",
"0101011010100000204",
"1001011011010020123",
"1001010110110000211",
"0100100110111070201",
"0100100110110000220",
"1010010010110000208",
"1011001001011050128",
"0110101001010000216",
"0110110101000000205",
"1010110110101040124",
"0010101101100000213",
"1001010101110000202",
"0100100101111020123",
"0100100101110000210",
"0110010010110060130",
"1101010010100000217",
"1110101001010000206",
"0110110101001050126",
"0101101011010000214",
"0010101101100000204",
"1001001101110030124",
"1001001011100000211",
"1100100101101070131",
"1100100101010000219",
"1101010010100000208",
"1101101001010060127",
"1011010101010000215",
"0101011010100000205",
"1010101011011040125",
"0010010111010000213",
"1001001011010000202",
"1100100101011020122",
"1010100101010000210",
"1011010010101070129",
"0110110010100000217",
"1011010101010000206",
"0101010110101050127",
"0100110110100000214",
"1010010110110000203",
"010