【C#】配列やリストから目的の値に最も近い値を取得する拡張メソッド その2

ソースコード using System; using System.Collections.Generic; using System.Linq; public static class IEnumerableExtensions { #region Nearest /// <summary> /// 目的の値に最も近い値を返します /// </summary> public static int Nearest( this IEnumerable<int> self, int target ) { var min = self.Min( c => Math.Abs( c - target )…</int>