{"categories":["C#","trap"],"provider_url":"https://hatena.blog","blog_title":"\u6c38\u9060\u306b\u672a\u5b8c\u6210","author_name":"thinca","version":"1.0","published":"2013-03-30 04:40:32","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fthinca.hatenablog.com%2Fentry%2F20130330%2F1364586032\" title=\" C# \u306e\u30bd\u30fc\u30c8\u3067\u30cf\u30de\u3063\u305f\u8a71 - \u6c38\u9060\u306b\u672a\u5b8c\u6210\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","url":"https://thinca.hatenablog.com/entry/20130330/1364586032","author_url":"https://blog.hatena.ne.jp/thinca/","type":"rich","height":"190","blog_url":"https://thinca.hatenablog.com/","provider_name":"Hatena Blog","title":" C# \u306e\u30bd\u30fc\u30c8\u3067\u30cf\u30de\u3063\u305f\u8a71","width":"100%","image_url":null,"description":"C#(mono 2.10.9) \u3067\u3001\u7279\u5b9a\u306e\u5024\u3092\u5148\u982d\u306b\u6301\u3063\u3066\u304d\u3064\u3064\u30bd\u30fc\u30c8\u3001\u3068\u3044\u3046\u306e\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u3002 \u3053\u3093\u306a\u611f\u3058\u304b\u306a\u30fc\u3002 var list = new List<int>{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int t = 5; // 5 \u3092\u5148\u982d\u306b\u6301\u3063\u3066\u884c\u304d\u305f\u3044 list.Sort((a, b) => { if (a == t) return -1; if (b == t) return 1; return a.CompareTo(b); }); Console.WriteLine(string.Join(\", \", list)); 1, 5, 2, 3, 4, 6, \u2026"}