All Questions
Tagged with object-oriented .net
58 questions
2
votes
1
answer
154
views
Saving entity containing complex jsonb column with validation and comparision
I've been a .NET Developer for almost 4 years. I'm stronly learning and trying using design patterns and following SOLID principles for 3 months right now (I know - a little late, but better late ...
2
votes
0
answers
112
views
Is this a valid implementation of Memento Pattern in C#?
I've been studying design patterns from GOF for a few weeks, especially in C#, and I'm struggling with Memento Pattern. I know there are a lot of C# implementations on the web, but I came up with my ...
4
votes
3
answers
663
views
Implement IDisposable correctly using object composition principle
Update at the end
Is it possible to implement IDisposable pattern correctly while using object composition principle to promote code-reuse, reduce code duplication ...
1
vote
0
answers
845
views
DataGridView Undo/Redo Manager in C#
While answering this code review question, I proposed a solution with List<DataTable>. I am trying to encapsulate this data structure into a "...
3
votes
0
answers
749
views
Simple Sqlite-driven WinForms app in C# 7.0 - database interaction code
Description
This is a simple "demo" app designed to help gain familiarity with interacting with an Sqlite database from C#, particularly storing images as blobs. The database has a single ...
2
votes
0
answers
39
views
Applying OOP to refactor my Windows Forms APP [closed]
Could you please give me some direction about how I could refactor my code? As I add functionalities to my Budget App the class is getting bigger and I'm sure I could start looking at separating ...
1
vote
2
answers
511
views
Object-oriented implementation on Expense Tracking App [closed]
I am creating a Expense Tracking Application in C# and right now I am trying to build its building blocks in a console app. I Would like to know your feedback if it is in a Object Oriented Design/...
0
votes
1
answer
52
views
proper structure of classes using interface classes [closed]
Given the following two interfaces what would the proper way to set up the two actual classes?
...
1
vote
1
answer
2k
views
ChangeCalculator for calculating money denominations in change
I'm doing some exercises in OOP and I just created a program that calculates amounts of denominations in a change at the shop. So, let's say something costs 10, I give 25.30 (for some reason), so I ...
2
votes
2
answers
2k
views
Game Character class with many skills
Im creating a class that has all of my data in and can see it would quickly become messy.
I feel that there must be a way of making it neater rather than making a new method each time
For example. I ...
6
votes
2
answers
4k
views
Custom enumeration classes
Lately I've been using a lot of enums in my project and the lack of generic Enum constraint seems to be quite problematic. This combined with few other headaches ...
2
votes
1
answer
361
views
Building a very basic calculator
I have been a VB developer for couple of years, but strictly using functional programming paradigms — I just started using object-oriented paradigms a few days ago, and want some advice on how ...
2
votes
2
answers
108
views
How to avoid code duplication in ordering system
Here is the piece of order system.
And this is hierarchy of order classes in this system
...
3
votes
2
answers
5k
views
Simple dice console game in C#
I wrote a little console game that is supposed to take some dice and some players and determine the winner of the game. I wrote it for the sole purpose of figuring out why i'm doing the things i'm ...
4
votes
2
answers
3k
views
Classifying a person by name, gender, and age using Chain of Responsibility pattern
I am very new to design pattern. Recently, I learned about the Chain of Responsibility pattern, so I tried to practice it. These nested conditionals are what I'm trying to replace with polymorphism ...