I am working on a small utility to manage a few computers connected on a network. This utility will have a button "Add Computer" on the UI which allows the user to configure a new computer.
I have a class called component:
public class component
{
public string name { get; set; }
public string ip { get; set; }
public string room { get; set; }
bla bla
}
Please keep I am absolutely not a professional, so forgive me if the question sounds stupid.
The first problem I got is: How can I create multiple instances of the same class at runtime? What I figured out is using a deep clone, with serialiazation and deserialization. Is it a good approach?
Second problem. Let's say at runtime I managed to create my clones and I have an object for every computer in my network. How can I create a file containing all those objects? How can I serialize them?
I am not looking for code, but just for someone pointing me in the right direction, as I am pretty sure my approach is not exactly the best. All suggestions are welcome.
Thanks a lot!