LabWork4
This commit is contained in:
parent
73e53fbec6
commit
fb1f6068c5
@ -12,7 +12,22 @@ public class MassiveGenericObjects <T> : ICollectionGenericObjects<T>
|
|||||||
{
|
{
|
||||||
private T?[] _collection;
|
private T?[] _collection;
|
||||||
public int Count => _collection.Length;
|
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()
|
public MassiveGenericObjects()
|
||||||
|
@ -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)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user