All Questions
18 questions
0
votes
1
answer
247
views
Calling the base method from overriden method to add some functionality
I have a small Linked list program which I created for just brushing up the concepts.
Following is my Node class
...
4
votes
1
answer
411
views
Abstract base class for binary serialization
Ensuring that some logic is always being run before the user's overriding methods.
I'm writing a library and I have some abstract classes that can be binary serialized (and users can subclass them and ...
1
vote
1
answer
2k
views
C# Coffee Machine
I saw this post and tried to do my attempt. This is the requirement of task:
Design a coffee machine which makes different beverages based on set
ingredients. The initialization of the recipes for ...
2
votes
3
answers
309
views
Builiding a Model from Stored Procedures
After reading that Data Classes can be considered a code smell, I am shifting from a pattern with many data classes and a single manager class that handles all the instantiation of the classes, to a ...
4
votes
2
answers
385
views
Animal, Dog, and IDangerous - Using interfaces and inheritance with C#
I'm quite new to object-oriented C#. I wanted to test my knowledge by creating a Dog/Animal classes. I also tried to implement ...
2
votes
1
answer
129
views
Interface and inheritance; creating download types for a download manager
I'm creating a download manager in C# (in combination with Unity 2019.1.8, running the .NET 4.x equivalent (MONO) scripting back end). To accomplish this I decided to start using interfaces and class ...
2
votes
2
answers
183
views
C# classes for system health metrics
My company wants me to build a serverless component (AWS Lambda) that checks every minute for our system components health.
The data model (classes structure) I have devised so far is as pasted below....
5
votes
1
answer
113
views
Page-by model of data output and search results with values for UI
This is my first experience of designing classes with inheritance. I would like to get feedback on the interaction between the presented classes. It is unlikely that this code will seem complicated. ...
-1
votes
1
answer
113
views
Class Inheritance in C# (possibly generics) [closed]
I'm working on a segment of code where it runs a number of tasks and then combine individual task results to construct a complete task result object, there's no concurrency involved so it's purely a ...
1
vote
2
answers
279
views
Is it normal to have a base type for Entities and Value Objects?
Please see the code below, which I am currently using in a production application. :
...
2
votes
1
answer
119
views
Class hierarchy for informative exceptions in ASP.NET core
I have a base class called ExceptionPlus(please suggest a better name). Which is being inherited by multiple child class like BusinessNotFoundException, ArgumentInvalidException etc.
My question is ...
3
votes
1
answer
158
views
Validating proper input
Verifying the user's input is almost always required, even in really simple apps such as console calculator. Due to the wide variety of scenarios where this is useful I decided to make a few classes ...
16
votes
5
answers
5k
views
Mini RPG equipment code
what do you think about this code? It's upgraded version of:
Classes representing items in an RPG game
...
3
votes
1
answer
2k
views
Classes representing items in an RPG game
I wrote a little program in C# that contains classes representing Items in RPG game. I wanted to have access to all inherited classes parameters from list contains parent Item class instances, so this ...
3
votes
2
answers
201
views
Loading items from XML document
I'm making a game in Unity and I need to have a inventory/item system, I decided to store my items in simple XML document which I later read from. I'm planning to have different varieties of items and ...