System.Func, 型の順序,矢印
『ジェネリックの「戻り値型」の位置に違和感あり - 囚人のジレンマな日々』より.
仕舞いに慣れると思ってたけど、未だになれない .NET Framework のジェネリックの戻り値型の位置。戻り値型の位置は最後がお作法らしい。
例えば、
public delegate TResult System.Func<T, TResult>( T arg )理由はないけど、
public delegate TResult System.Func<TResult, T>( T arg )の方が良いと思うの私だけだろうか?
同じく昔一時期気になってたけど,「ああこれは矢印なんだな」と一人納得して以来最近は気にならないかも.
static bool StartsWith(string str, string value, bool ignoreCase, CultureInfo culture) { return str.StartsWith(value, ignoreCase, culture); } // <del>string -> string -> bool -> CultureInfo -> bool</del> // <ins>(訂正)</ins>(string, string, bool, CultureInfo) -> bool Func<string, string, bool, CultureInfo, bool> startWith = StartsWith;