ISEbd-21_Agliullov.D.A._Con.../ConfectionaryListImplement/DataListSingleton.cs

25 lines
622 B
C#
Raw Permalink Normal View History

2024-02-02 11:10:52 +04:00
using EkzamenListImplement;
namespace ConfectioneryListImplement
{
public class DataListSingleton
{
private static DataListSingleton? _instance;
2024-02-02 11:10:52 +04:00
public List<Student> Students { get; set; }
public List<Group> Groups { get; set; }
private DataListSingleton()
{
2024-02-02 11:10:52 +04:00
Students = new List<Student>();
Groups = new ();
}
public static DataListSingleton GetInstance()
{
if (_instance == null)
{
_instance = new DataListSingleton();
}
return _instance;
}
}
}