Изменение SetMaxCount на MaxCount
This commit is contained in:
parent
75ec5da6bd
commit
ac10e0d6e7
@ -17,7 +17,7 @@ namespace ProjectAirplaneWithRadar.CollectionGenericObjects
|
||||
/// <summary>
|
||||
/// Установка максимального количества элементов
|
||||
/// </summary>
|
||||
int SetMaxCount { set; }
|
||||
int MaxCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Добавление объекта в коллекцию
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user