2015-06-23から1日間の記事一覧

AOJ で string.Join の第2引数に int[] を渡すとコンパイルエラーになる

AOJ

AOJ で C# コードのコンパイルエラーに関するメモです。 AOJ の mono のバージョンのためか、string.Join の第2に引数に int[] を渡すとコンパイルエラーになるようです。その回避方法です。 // OK static void Display1(int[] xs) { string[] ss = xs.Selec…

Python の itertools.repeat を C# で作る

Python の itertools.repeat を C# で作ってみます。 using System; using System.Collections.Generic; using System.Collections; using System.Linq; class Repeat<T> : IEnumerable<T> { private const int INFINITY = -1; // 無限のときの _times の値 privat</t></t>…