G
GroupReader
In my app, I have two very similar static classes. After long
thought, I've decided *yes - keep them static*.
- Sometimes I will want to use Static Class A, and somtimes I will
want to use Static Class B, depending on the situation.
- The interfaces (are interfaces allowed on static classes?) are
almost identical.
What's the best way in code to create some sort of "factory" that will
return a reference to Static Class A *OR* Static Class B, depending
on a switch.
(With instance classes, this is fairly straightforward, but I don't
know the best way to do it with static classes)
Are Interfaces allowed? How do you create a "factory" that returns a
reference to a static class, and not an instance of an object?
Thanks for the input.
thought, I've decided *yes - keep them static*.
- Sometimes I will want to use Static Class A, and somtimes I will
want to use Static Class B, depending on the situation.
- The interfaces (are interfaces allowed on static classes?) are
almost identical.
What's the best way in code to create some sort of "factory" that will
return a reference to Static Class A *OR* Static Class B, depending
on a switch.
(With instance classes, this is fairly straightforward, but I don't
know the best way to do it with static classes)
Are Interfaces allowed? How do you create a "factory" that returns a
reference to a static class, and not an instance of an object?
Thanks for the input.