if my app can only have one file open at a time, is it a good idea to start sticking static methods all over my code? such as:
Code:internal static class Program { public static MyFileClass curFile; // ... }i know that seems kind of vague, but i began coding a project and didn't plan well, so some methods took a MyFileClass as a parameter while some just used the static variable. Which would be a better idea?Code:internal class MainForm : Form { public static MainForm inst; public MainForm() { inst = this; InitializeComponent(); } // ... }
Thanks in advance,
John




Reply With Quote