M
Mark Jerde
This is probably a simple FAQ I missed in my reading & googling. I've been
using C# for over a year but I don't know the best way to handle a simple
class that will be called many times from many objects. The class doesn't
have to save state, it is really a simple function. IIRC VB6's "module"
worked well for this.
For example I need a class that takes a byte or an array of bytes and
returns a nybble-oriented, leading-zero-filled string representing the bits.
E.g.
In: 0F
Out: "0000-1111"
I know how to write the class but I'm not sure the best way to set up the
rest of my program to minimize creation & disposing of its instances.
This class will be called a bazillion times from the 40 instances of a
usercontrol on my Windows form. Other than creating a BinaryNybble object
in the main form and passing it to the 40 UCs as they are created, is there
another way to have the 40 UCs share one BinaryNybble instance?
Thanks.
-- Mark
using C# for over a year but I don't know the best way to handle a simple
class that will be called many times from many objects. The class doesn't
have to save state, it is really a simple function. IIRC VB6's "module"
worked well for this.
For example I need a class that takes a byte or an array of bytes and
returns a nybble-oriented, leading-zero-filled string representing the bits.
E.g.
In: 0F
Out: "0000-1111"
I know how to write the class but I'm not sure the best way to set up the
rest of my program to minimize creation & disposing of its instances.
This class will be called a bazillion times from the 40 instances of a
usercontrol on my Windows form. Other than creating a BinaryNybble object
in the main form and passing it to the 40 UCs as they are created, is there
another way to have the 40 UCs share one BinaryNybble instance?
Thanks.
-- Mark