Functions that don't require new class declaration
Posted on 2006-05-07
I know this is a very simple thing to do, as I've done it loads of times before, but it's been soooooo long since I've coded in C# that I really need some refreshing on certain aspects!
Imagine that I've created a function in a class and I want to call that function from elsewhere in my project. I would do one of the following....
obj = new Namespace.Class();
....but, what I really want to do is this....
I'm pretty sure that this boils down to the declaration of the function itself, but can't for the life of me figure out (or succesfully Google) how to do it!
Can someone give me an example please?