All Questions
19 questions
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
384
views
C# code for Dhond't voting method UK Parliament
Please can you check if the code I have written follows 4 rules of OOP well enough, if there is anything that could be improved or is just wrong I am happy to change (very new to C# sorry if it's ...
0
votes
0
answers
118
views
A Generic Two Dimensional Data Plane with Common Math Calculation Build-in Methods in C#
This is a follow-up question for A Generic Two Dimensional Data Plane with SubPlane Method in C#. Thanks to aepot's answer.
I am trying to implement a series methods to enhance the ability and ...
1
vote
1
answer
138
views
A Paragraph Merger with Removing Overlapped Duplicated Lines in C#
I am trying to make a paragraph merger that takes multiple paragraphs and output a concatenated result with removing the duplicated overlapped lines due to redundancy. Each input paragraph is with the ...
1
vote
1
answer
137
views
A Generic Two Dimensional Data Plane with SubPlane Method in C#
This is a follow-up question for Generic Two Dimensional Data Plane with Manipulation Methods For C# and A SubPlane Method for Generic Two Dimensional Data Plane in C#. Based on iSR5's suggestion, in <...
0
votes
1
answer
458
views
3
votes
2
answers
127
views
A SubPlane Method for Generic Two Dimensional Data Plane in C#
This is a follow-up question for Generic Two Dimensional Data Plane with Manipulation Methods For C#. Thanks to cliesens's and Rick Davin's detailed answer. Moreover, the mentioned ...
6
votes
3
answers
199
views
Generic Two Dimensional Data Plane with Manipulation Methods For C#
I know that there is a generic data structure System.Array could be used to create customized type array. I want to focus on the two dimensional data structure that ...
5
votes
3
answers
2k
views
Implementing a quiz application in C# (object-oriented)
I posted a recent question on code review detailing my previous C# object-oriented application which used animals as the main context. Although this example doesn't really include inheritance or ...
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 ...
4
votes
1
answer
215
views
Class responsibilities OOP design [closed]
I'm having some questions on creating a design for simple approval workflow. Some arbitrary thing (ItemToApprove) needs approval process. Approval process begins ...
3
votes
1
answer
17k
views
Populating values into a C# object
I have written a function to populate values into a class whose structure is as given below
...
4
votes
3
answers
2k
views
Nested class or two separate classes?
I am making this program that is going to calculate distance from randomly generated dots (with x and y coordinates) to 5 bigger ones and then its going to put each smaller dot into the group with ...
6
votes
7
answers
8k
views
One instance per method call or multiple method call per instance
I have the following class designs, and I'm looking for the best practices, aligned to the OOP design principles/patterns.
The ParameterParser will be used inside ...
4
votes
2
answers
9k
views
Implementation of OOP for retrieving list of objects from database
If I have a Person class that outlines the properties of a person and one of People that just contains a ...