This commit is contained in:
kirkorovka 2024-05-06 18:24:37 +04:00
parent 73e53fbec6
commit fb1f6068c5
2 changed files with 17 additions and 10 deletions

View File

@ -12,7 +12,22 @@ public class MassiveGenericObjects <T> : ICollectionGenericObjects<T>
{
private T?[] _collection;
public int Count => _collection.Length;
public int SetMaxCount { set { if (value > 0) { _collection = new T?[value]; } } }
public int SetMaxCount {
set
{
if (value > 0)
{
if (_collection.Length > 0)
{
Array.Resize(ref _collection, value);
}
else
{
_collection = new T?[value];
}
}
}
}
public MassiveGenericObjects()

View File

@ -216,14 +216,6 @@ public partial class FormSAUCollection : Form
}
private void maskedTextBox_MaskInputRejected(object sender, MaskInputRejectedEventArgs e)
{
}
private void labelCollectionName_Click(object sender, EventArgs e)
{
}
}