Skip to main content

All 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 ...
JimmyHu's user avatar
  • 7,068
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 <...
JimmyHu's user avatar
  • 7,068
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 ...
JimmyHu's user avatar
  • 7,068
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 ...
JimmyHu's user avatar
  • 7,068
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 ...
Jackie's user avatar
  • 129
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 ...
MiniWalrus's user avatar
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 ...
Joelius's user avatar
  • 355
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 ...
BenH's user avatar
  • 133
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: ...
TomSelleck's user avatar
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 ...
Siraj M's user avatar
  • 115
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 ...
Andre Borges's user avatar
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 ...
Gae's user avatar
  • 31
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 ...
Denis's user avatar
  • 8,558
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 ...
Denis's user avatar
  • 8,558
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 ...
Rondles's user avatar
  • 213

15 30 50 per page