All Questions
Tagged with object-oriented c#
443 questions
4
votes
2
answers
157
views
Object Oriented WinForm App
I have started my first foray into object oriented programming and I wanted to find out if what I have done here makes sense:
Pokedex.cs
...
1
vote
1
answer
70
views
Handling HTTP requests in existing Web Api
I am working in a Web Api project that has the following project structure:
Root
Controllers
Orchestrators
Managers
Services
etc
The ...
0
votes
3
answers
167
views
Declaring type definition once for all variables
To avoid the use of magic numbers, I created a static class to store some integer values that are represented inside a database. I avoided using enums because I need to cast them every time I use them....
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
...
1
vote
1
answer
285
views
Username and Password checker for invalid entries
I'm very new to programming and coding and "wrote" my first program from scratch as an at home exercise after doing some online courses.
My question is not necessarily a problem I'm having ...
6
votes
1
answer
458
views
C# Snake in Console
I've created Snake in Console. I've tried to make my code as good as I possibly could.
(Code on github: https://github.com/bartex-bartex/SnakeCSharp)
Question
Is my coding style good enough, so I can ...
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 ...
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 ...
5
votes
1
answer
432
views
Simple Ellipse Collision Mini Game
I am doing an exercise to help me understand C#and OOP. The exercise is supposed to teach me about ...
5
votes
3
answers
1k
views
Simple N Puzzle console game
I am completely new to object oriented programing (OOP). I have also never worked with C# before. The exercise from my book had some requirements that should be ...
2
votes
1
answer
173
views
Creating object in JS that is passed into IHttpHandler
I am working on a web page where I am creating a JS object using {} and []. This object is passed into a handler
I wanted to ...
3
votes
2
answers
2k
views
Password Validation Class
I created a class designed to validate passwords based on user defined criteria. Each PasswordValidator object objects a minimum and maximum password length, a character blacklist, as well as ...
0
votes
1
answer
67
views
API Data Load method advice- too many parameters per method?
This is my first question so please let me know if this is too vague/broad and I will do more research on question asking.
I have implemented a handful of data loaders in C#, and have come to the ...
0
votes
2
answers
857
views
Generates all pairs (combinations of 2) up to a limit (exclusive)
Any improvements on this combination generator.
Seen a lot of combination generators online, but none like this.
Found pseudocode at:
https://www.baeldung.com/cs/generate-k-combinations
Fastest I ...
4
votes
3
answers
289
views
A refactored payment service, handling several payment schemes
I was asked to refactor a class, to make it adhere to SOLID principles, with testability and readability. I thought I had done a decent job, only my feedback was:
a) Unnecessary introduction of ...