Hello,
I have a class where I have a static list.
My challenge is, how to use the _list as datasource to a datagrid in a form?
Anyone that can help with howto do that?
Below is the class:
static class MyList
{
static List _list;
static MyList()
{
_list = new List();
}
public static void Add(string value, string value2, string value3)
{
_list.Add(new InstalledServices()
{
Service = value,
Name = value2,
Status = value3
});
}
public static void Show()
{
foreach (var value in _list)
{
Console.WriteLine(value);
}
}
class InstalledServices
{
public string Service { get; set; }
public string Name { get; set; }
public string Status { get; set; }
}
}
Thomas NielsnePosted Nov 8, 2019, 10:56 AM
Hello Rajanikant,
Sorry, but is it possible to make an example, that shows how to call it from a WIndows form?
Rajanikant HawaldarPosted Nov 8, 2019, 9:20 AM