读书人

这个能用Linq改下么?现阶段研究Linq

发布时间: 2011-12-07 22:35:48 作者: rapoo

这个能用Linq改下么?目前研究Linq to object

C# code
            string date = "2011年6月3日 14:01";            Regex regex = new Regex(@"(\d+)年(\d+)月(\d+)日 (\d+):(\d+)");            Match m= regex.Match(date);            string[] arrstr ={ m.Groups[1].Value, m.Groups[2].Value, m.Groups[3].Value,m.Groups[4].Value,m.Groups[5].Value };//这里可以用Linq么 skip1take5???            string format = "{0}-{1}-{2} {3}:{4}";            string result = string.Format(format, arrstr);            Console.WriteLine(result);            Console.ReadLine();


[解决办法]
探讨

必须实现 必须实现Ienumerable<t>?

读书人网 >.NET

热点推荐