- 1.0.0.0 ç³»
- 1.1.0.0 ç³»
- 1.2.0.0 ç³»
- å ¬éããã®ãå¿ãã¦ãã
- 1.3.0.0 ç³» (XNA 3.0 対å¿)
- 4.0.0.0 ç³» (.NET Framework 4.0 å°ç¨)
C# 3.0 ç¨ã«ä»ã¾ã§ã ãã ãã¨æ¸ãã¦ãã Extension Methods ã¨åæ¨è«ç¨ Generic Methods ã軽ãã¾ã¨ãã¦ã¿ãï¼èå³ãããæ¹ã¯ãèªç±ã«ã©ããï¼
åæ¨è«ç¨ Generic Methods 㯠Achiral.Make ã¨ãã static class ã«éç´ï¼ç¶ã㯠IntelliSense ã¨ã½ã¼ã¹ã³ã¼ãã§ï¼
Extension Methods ã使ãã«ã¯ä»¥ä¸ã® using æã追å ããã° OKï¼
using Achiral.Extension;
使ç¨ä¾
mscorlib.dll ã«ããå ¨ã¦ã®åã®ç¶æ¿ããªã¼ã表示ï¼
using System; using System.Collections.Generic; using System.Linq; using System.IO; using Achiral; using Achiral.Extension; static class Program { static void Main(string[] args) { var asm = typeof(int).Assembly; var children = asm.GetTypes().Where(type => type.BaseType != null) .ToLookup(type => type.BaseType, type => type); var q = Make.Sequence(typeof(object)) .CascadeDepthFirst(type => children[type], (Type, NestLevel) => new { Type, NestLevel }); q.ConsoleWriteLine(item => new string(' ', 3 * item.NestLevel) + item.Type.FullName); } }
åè
- Extension Methods API - Codeplex
- ä¼¼ããã¨ããã£ã¦ãã人