Hello!
A couple of months ago I made a Ruby program containing a module to hold all the common operations I was doing throughout the program.
Now I'm switching to C# and I would like to know how I could achieve the same effect.
I've been told that namespaces were the C# equivalent of Ruby modules. However, I can't seem to use them the same way.
I would like it to hold variables and methods outside of classes and be able to interact with them as I see fit.
Maybe I'm wrong with namespaces and I should probably use static classes, but as far as I know static classes can only content static stuff which doesn't work for me.
Any thoughts about this?
Thank you very much,
- Dargor
A couple of months ago I made a Ruby program containing a module to hold all the common operations I was doing throughout the program.
Now I'm switching to C# and I would like to know how I could achieve the same effect.
I've been told that namespaces were the C# equivalent of Ruby modules. However, I can't seem to use them the same way.
I would like it to hold variables and methods outside of classes and be able to interact with them as I see fit.
Maybe I'm wrong with namespaces and I should probably use static classes, but as far as I know static classes can only content static stuff which doesn't work for me.
Any thoughts about this?
Thank you very much,
- Dargor