Forum; I am a newbie working out a bit of code. I would like to know the best way to use separate .cs files containing other classes and functions. As an example of a basic func
It is fairly simple to do. In your btClear.cs file simply generate a class definition like:
public class MyUtility
{
public static void ClearContents(IEnumerable controls)
{
//TODO: Code that clears contents of controls passed
}
}
Then you can call it from wherever the namespace the generated class is contained in is referenced via:
MyUtility.ClearContents(SomeControlCollection);
I hope I didn't completely miss the mark on your intention.