Skip to main content

All 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. ...
Doruk's user avatar
  • 293
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 ...
FlameHorizon's user avatar
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: ...
Caïn's user avatar
  • 111
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 ...
EvilPCDiva's user avatar
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 ...
Skary's user avatar
  • 248
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 ...
Dhruv Sawhney's user avatar
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 ...
Tobi Alafin's user avatar
  • 1,796
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 ...
JimmyHu's user avatar
  • 5,392
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 ...
dfhwze's user avatar
  • 13.9k
2 votes
1 answer
1k views

Simple, flexible, and thread-safe key/value memory cache

MemoryCache.cs ...
Shelby115's user avatar
  • 1,961
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: ...
Sean Kelly's user avatar
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 ...
766F6964's user avatar
  • 901
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 ...
766F6964's user avatar
  • 901
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 ...
Sindhu's user avatar
  • 59
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 ...
THExLONExCUBAN's user avatar
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 <...
nivk's user avatar
  • 235
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. ...
Vlad Sandu's user avatar
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 ...
gmail user's user avatar
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 ...
gmail user's user avatar
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 ...
pgs's user avatar
  • 922
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 ...
GohanP's user avatar
  • 213
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 ...
Joan Dimko's user avatar
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 ...
Eslam Ali's user avatar
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 ...
Horváth Dávid's user avatar
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 ...
Pollob's user avatar
  • 163
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 ...
Jianmin Chen's user avatar
  • 2,396
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. ...
Palmi's user avatar
  • 141
1 vote
1 answer
92 views

Binary Search Optimization [closed]

Can anyone give me recommendations on how to improve my code? ...
nikolay's user avatar
  • 21
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? ...
Vasko Yanakiev's user avatar
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 ...
Steelilack's user avatar

15 30 50 per page