PIbd-13_Kulikova_D.R_LabWork04_Simple #4

Closed
kirkorovka_1 wants to merge 3 commits from LabWork4 into LabWork3
2 changed files with 17 additions and 10 deletions
Showing only changes of commit fb1f6068c5 - Show all commits

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)
{
}
}