コード例 #1
0
        public static T First <T>(this Generic.IEnumerator <T> me)
        {
            T result;

            if (me.NotNull())
            {
                result = me.MoveNext() ? me.Current : default(T);
                me.Dispose();
            }
            else
            {
                result = default(T);
            }
            return(result);
        }