System.ComponentModel.DataAnnotations.CountPropertyHelper static class CountPropertyHelper Documentation Code public static bool TryGetCount(object value, out int count)