コード例 #1
0
        /// <summary>
        /// Gets the last entry from the collection of entries.
        /// </summary>
        /// <param name="entries">The collection of entries</param>
        /// <returns>JOBject of the last entity </returns>
        public static JObject GetLastEntry(JArray entries)
        {
            JObject lastEntry = null;

            if (entries != null && entries.Count > 0)
            {
                JToken lastItem = entries.Last(o => o.Type == JTokenType.Object);
                lastEntry = (JObject)lastItem;
            }

            return lastEntry;
        }