All Questions
17 questions
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
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 <...
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 ...
2
votes
0
answers
133
views
Making 90% similar code for 20 different objects
Basically, I have 20 very similar objects and most importantly I want to do the same thing for all of them.
This is the ImportProcessor class for ...
11
votes
5
answers
2k
views
Generic Heap Implementation in C#
This has been done a thousand times on here already, but here's another binary heap implementation. The implementation is generic in terms of heap elements, allows for injection of any type of ...
4
votes
2
answers
967
views
Generic wrapper for single value or array of values
I'm writing a chart.js port for c# blazor (you can find it here) using C# 8.0 with .NET Core 3 (latest preview).
In chart.js there is this thing called indexable options. It let's you use either a ...
3
votes
1
answer
130
views
Map, which contains biomes, which contain landforms, which contain tiles
I am trying to model this:
a Map can have multiple child of type Biomes and no parent
a Biome can have multiple child of type Landforms and a Map as its parent
a Landform can have multiple child of ...
5
votes
1
answer
205
views
Service for generating faked objects
I'm using the Bogus library to mock up some data for testing.
This is my main method demonstrating how the faking service should be used:
...
2
votes
3
answers
821
views
Get collection of objects from CSV string and vise-versa
A generic class to get object collection from csv string. I would like to know if there's any better way?
Converter class
...
5
votes
1
answer
2k
views
Processor for handling generic commands
I'm trying to implement business logic layer based on concepts of commands and command handlers.
A command is a thing that contains input parameters for executing some action, and it knows what kind ...
2
votes
3
answers
4k
views
C# - exercise - object validation - reflection - generics
Just published (GitHub) a C# example for object Validation, for this purpose I decided to use the .NET Reflection and tried to use Generics. I would really like to improve coding, can you please give ...
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 ...
6
votes
2
answers
1k
views
Generic immutable object builder
I've made an object builder which can create all sorts of classes, it can also create immutable objects.
There are 2 requirements that must be met in order for this pattern to work with fully ...
11
votes
2
answers
11k
views
Empty Interface usage - Is this a code smell?
I've recently made a set of interfaces/classes to work with converting a spreadsheet into an object but I utilise an empty interface in my design:
I have my interface which defines what a spreadsheet ...