All Questions
Tagged with c# reinventing-the-wheel
71
questions
8
votes
2
answers
1k
views
C# Linked List implementation
I am trying to learn C# and created this project to improve. I will be using C# professionally so a harsh critique is welcome.
...
3
votes
0
answers
83
views
Implementation of damage calculation based on Final Fantasy 9
I am re-implementing the damage calculations for the game Final Fantasy 9, based on the documentation provided in the GameFaqs Battle Mechanics Guide. Currently, I have two main methods for performing ...
1
vote
0
answers
165
views
Priority Queue implementation using a Heap [closed]
I'm working on a custom implementation of A-Star and so I had to also create a Priority Queue and so I had to create a Heap. I'm quite happy with my Heap but I'm a bit worried about my Priority Queue: ...
1
vote
1
answer
68
views
Mapping various input values to a data accumulation class
This function takes inputs from multiple different controls on a form, and maps them to values in a data accumulation class. This code was written specifically to keep logic, data, and display ...
4
votes
0
answers
127
views
Securely generate Token for authentication
In my experience i had the need that some application (both desktop and web) can excange data to authenticate users (even if the data for authenticating users are not reacheable form desktop ...
1
vote
0
answers
253
views
What’s the correct usage of volatile keyword in this Concurrent dictionary implementation?
Can I get some guidance around the usage of volatile keyword and design of the existing concurrent dictionary implementation, please.
Here are a few design ...
0
votes
1
answer
198
views
Linked List Implementation in C#
I wrote an implementation of the Linked list data structure. I mostly did this because it's the simplest collection data structure (at least the simplest to implement), and I wanted to practice ...
1
vote
1
answer
97
views
A Tiny Image Tagger Implementation in C#
I am trying to implement a tiny image tagger with customized tag options in C#. The main window is as follows.
The left block is a picture box MainPictureBox and ...
5
votes
2
answers
181
views
Code Challenge: basic arithmic operations using only incrementation operator
Challenge
Write a function that takes 2 integer operands left and right
(both >= 0) and evaluates one of the following ...
2
votes
1
answer
1k
views
Simple, flexible, and thread-safe key/value memory cache
MemoryCache.cs
...
3
votes
2
answers
214
views
codekata: Binary search on an int array
I'm following Karate Chop kata for a binary search. I really wanted to avoid built in functionality within the language. I'm pretty new to C# so any recommendations is greatly appreciated.
Spec: ...
6
votes
2
answers
251
views
Compact command line argument parser : Revisited
This question is a follow up to my previous one which can be found here.
The user dfhwze suggested me to look into compiler construction and recommended me to write a lexer and a parser that would ...
2
votes
1
answer
500
views
Compact command line argument parser
So, I decided to write my own little command line argument parser for various other projects I work on. I am aware that there are many good command line parser libraries, but I did wrote my own anyway ...
5
votes
1
answer
3k
views
In-Memory database supporting transactions
I referred to the post here but it does not address the question that I have with regards to my implementation. I have a C# implementation of an in-memory database that I came up with during a recent ...
2
votes
2
answers
333
views
Generic Singly-Linked List implementation
I'm looking for some feedback regarding my implementation of a generic singly-linked list in C#. I'm also looking for some tips on how to implement other techniques such as using ...
3
votes
2
answers
708
views
Implement Immutable Collection in C#
I would like to define some constant sequences (of bytes, specifically) in my C# library/API. Both length and content should not vary, preferably by any means (barring reflection). To this end, a <...
9
votes
1
answer
783
views
Simple LinkedList
I guess this has been made a couple of times by now, but i wanted to take my chance on creating a simple generic linked list in c#.
What do you think ?
This is the main class.
...
2
votes
3
answers
199
views
Addition of 2 integers
I've implemented an algorithm found in a book. It adds 2 positive integers of equal size. How can it be improved? It is assumed that inputted data is always positive integers with an equal number of ...
3
votes
4
answers
4k
views
Convert decimal to string
I wrote a C# program that converts decimal to string. It is not the best but it works. I'm looking for inputs from others on how ...
7
votes
2
answers
2k
views
Class Matrix implementation
Following the 18.06 Linear algebra course, I was curious to reinvent the matrix class and basic functionality, like \$PA=LU \$ decomposition, Gauss elimination, finding inverse matrix etc.
Any ...
11
votes
5
answers
6k
views
Stopwatch class
I am learning C# and I have an exercise:
Design a class called Stopwatch. The job of this class is to simulate
a stopwatch. It should provide two methods: Start and Stop. We call
the start ...
3
votes
1
answer
661
views
C# basic dictionary (hash) implementation
I have implemented a very basic hash data structure with basic set/retrieve methods.
A good example of use of this implementation would be a phone-book.
I have used as underneath storage structure an ...
2
votes
1
answer
369
views
StopWatch for users C#
I have tried to create a stopwatch and I have done but I don't know how to improve it, and I want the user control the stopwatch whether it (Start) or (Stop), I'll be thankful if you tell me what I ...
8
votes
1
answer
5k
views
Library, that finds the derivative of a function
I've written a small library, that provides a way to store mathematical expressions in a tree-like structure, and provides a method, that finds the first derivative of a function. I know, that there ...
16
votes
4
answers
2k
views
String Queue implementation
Is the implementation clean enough & can be used in production?
I tried to write clean & bug-free code. It looks good to me.
I would appreciate any improvement suggestions.
One question I ...
5
votes
2
answers
23k
views
LINQ and string.Split do it yourself practice
Problem Statement:
Implement a sentence scanning functionality to parse the sentence and return a string to concatenate each word with its number of occurrences, sorted by the number of ...
4
votes
0
answers
11k
views
Logging into Database with ASP.NET Core
In the Startup.cs of my ASP.NET Core application I want to configure the LoggingFactory so that it logs into the database. ...
1
vote
1
answer
92
views
Binary Search Optimization [closed]
Can anyone give me recommendations on how to improve my code?
...
1
vote
2
answers
1k
views
Optimizing a binary search algorithm
I have implemented a binary search algorithm in C#. Can anyone give me suggestions on improving its effectiveness?
...
7
votes
1
answer
872
views
Custom Big Integer class for Project Euler in C#
I'm trying to teach myself some programming and, working through the Project Euler problems, I've come across some instances where I've needed numbers that are larger than will fit into an int or long ...