Quantcast
Channel: Is it possible to make a group of classes that are similar? - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by user2864740 for Is it possible to make a group of classes that are...

I would consider an Interface1 (note this is not"making numbers" as the original, but such could be done using the same ideas; this just seems like the more logical goal)interface IBinaryOp { int...

View Article


Answer by Haedrian for Is it possible to make a group of classes that are...

That sort of thing is a common design pattern for use with interfaces. Using your example would however be a bit weird.public interface IMakesNumber{public int MakeNumber(int number);}Then all your...

View Article


Is it possible to make a group of classes that are similar?

I am wondering if I can make a group of classes that all have the same functions, but the algorithm in each is different. Let's say we had. Multiply.cs, Add.cs ,and Subtract.cs. Each would have this...

View Article
Browsing latest articles
Browse All 3 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>