{"published":"2022-08-23 14:47:42","width":"100%","author_url":"https://blog.hatena.ne.jp/baba_s/","author_name":"baba_s","categories":["C#","C# - \u62e1\u5f35\u30e1\u30bd\u30c3\u30c9"],"url":"https://baba-s.hatenablog.com/entry/2022/08/23/144742","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbaba-s.hatenablog.com%2Fentry%2F2022%2F08%2F23%2F144742\" title=\"\u3010C#\u3011\u6761\u4ef6\u3092\u6e80\u305f\u3059\u5834\u5408\u306b\u306e\u307f Prepend \u3059\u308b\u62e1\u5f35\u30e1\u30bd\u30c3\u30c9 - \u30b3\u30ac\u30cd\u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","version":"1.0","title":"\u3010C#\u3011\u6761\u4ef6\u3092\u6e80\u305f\u3059\u5834\u5408\u306b\u306e\u307f Prepend \u3059\u308b\u62e1\u5f35\u30e1\u30bd\u30c3\u30c9","blog_title":"\u30b3\u30ac\u30cd\u30d6\u30ed\u30b0","blog_url":"https://baba-s.hatenablog.com/","height":"190","provider_name":"Hatena Blog","image_url":"https://cdn-ak.f.st-hatena.com/images/fotolife/b/baba_s/20180826/20180826160156.png","type":"rich","description":"\u6982\u8981 using System.Collections.Generic; using System.Linq; namespace Kogane { public static class EnumerableExtensionMethods { public static IEnumerable<T> PrependIf<T> ( this IEnumerable<T> self, bool conditional, T element ) { return !conditional ? self : self.Prepend( element ); } } }"}