I got only 1 form, which use to retrieve text from a text file. After that I need to do convertion(convertion of the text file) and display(display the converted text) as well.
I manage to have 4 class which are Form1.cs, Convertion.cs, Display.cs and Database.cs. So Form1, Convertion and Display must sharing the same instant of Database class. But i don't know how to do in c#. Because what I'm able to do is create different instant on the 3 class (Form1, Convertion and Display). Then they are not sharing the same database anymore. Is it all I need to do is 3 of these classes inherit Database.cs?
Another problem is these 3 classes are running simulataneously. It might overwriting the database.
What I did is (which currently I don't have Database.cs), I keep using get,set function to update the data when everytime I need to update or read the data. So these 3 classes has the same variables with different name. But I found that this is not a good way.
Thanks for any suggestion. Sorry because I don't really study C# before.