diff --git a/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/ICollectionGenericObjects.cs b/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/ICollectionGenericObjects.cs index d0b1a69..be6574b 100644 --- a/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/ICollectionGenericObjects.cs +++ b/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/ICollectionGenericObjects.cs @@ -17,7 +17,7 @@ namespace ProjectAirplaneWithRadar.CollectionGenericObjects /// /// Установка максимального количества элементов /// - int SetMaxCount { set; } + int MaxCount { get; set; } /// /// Добавление объекта в коллекцию diff --git a/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/ListGenericObjects.cs b/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/ListGenericObjects.cs index 5f75759..3313fb3 100644 --- a/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/ListGenericObjects.cs +++ b/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/ListGenericObjects.cs @@ -20,7 +20,19 @@ namespace ProjectAirplaneWithRadar.CollectionGenericObjects public int Count => _collection.Count; - public int SetMaxCount { set { if (value > 0) { _maxCount = value; } } } + public int MaxCount { + set + { + if (value > 0) + { + _maxCount = value; + } + } + get + { + return _maxCount; + } + } public CollectionType GetCollectionType => CollectionType.List; diff --git a/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/MassiveGenericObjects.cs b/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/MassiveGenericObjects.cs index dd5804a..6b87964 100644 --- a/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/MassiveGenericObjects.cs +++ b/AirplaneWithRadar/ProjectAirplaneWithRadar/CollectionGenericObjects/MassiveGenericObjects.cs @@ -15,7 +15,7 @@ namespace ProjectAirplaneWithRadar.CollectionGenericObjects public int Count => _collection.Length; - public int SetMaxCount + public int MaxCount { set { @@ -31,6 +31,11 @@ namespace ProjectAirplaneWithRadar.CollectionGenericObjects } } } + + get + { + return _collection.Length; + } } public CollectionType GetCollectionType => CollectionType.Massive;