Skip to main content

All Questions

5 votes
2 answers
22k views

Converting a 12 hour time string to a 24 hour time string

Input - Standard input - HH:MM:SS[AM|PM] format. Examples: 12:00:00AM 12:00:00PM 01:00:10AM 01:00:10PM The program reads one line per instance. Output - military format (24 hour format): 00:00:00 ...
Anubhav's user avatar
  • 181
3 votes
1 answer
2k views

.NET MSSQL Wrapper

Back in late 2012, I wrote the following C# .NET MSSQL Wrapper, which offered the following operations: ExecuteScalar (for selecting single field from a row) ...
Latheesan's user avatar
  • 283
5 votes
1 answer
2k views

Converting IP Addresses to minimal binary formats

Once more, I come to you for assistance! I have written a significant bit of code that converts IP Addresses from strings to minimal byte-arrays. (So that you can store them in a binary format instead ...
Der Kommissar's user avatar
3 votes
2 answers
4k views

Windows Forms `ControlCollection` implementation

I've implemented my own version of the Control.ControlCollection class in System.Windows.Forms and obviously I want it reviewed. ...
Der Kommissar's user avatar
6 votes
2 answers
480 views

Simple Configuration Manager

below I have coded a simple configuration manager that loads config elements from a file straight into a dictionary, and also has a function for getting an element by its key in the dictionary. I just ...
Adam Barret's user avatar
11 votes
7 answers
9k views

Numbers to byte-arrays and back

As the title explains, this is a series of extension methods that convert certain numeric types to and from byte-arrays, for certain actions which work better on byte-array types than numeric types. ...
Der Kommissar's user avatar
5 votes
2 answers
144 views

Singly linked list backed stack

I commented on a question and blindly asserted that a Stack based on a linked list was rather elegant (see here) I haven't ever written a Stack in C# so I thought I should back up my claim: ...
RobH's user avatar
  • 17k
4 votes
5 answers
17k views

Stack implementation in C#

I started to learn data structures. How can I improve my implementation? For example, I don't now how to push 0 or how to realize my own ...
Anatoly's user avatar
  • 296
2 votes
1 answer
1k views

Significant Figures Formatting.00

I wrote this for an SO question on formatting numbers to specific quantities of significant figures (after all, reinventing-the-wheel), anyway, all critiques welcome. It's pretty easy to use, ...
Der Kommissar's user avatar
7 votes
2 answers
679 views

Color structure with single field for multiple properties

This struct is used a lot throughout my programme. This struct is responsible for only things regarding colour, not anything else. I'm largely concerned of the ...
Der Kommissar's user avatar
5 votes
3 answers
3k views

Simple Service Locator

I've created a small, strongly-typed generic Service Locator object for .NET 3.5. It supports optional polymorphic service location and keyed services. I am looking for a general review, but ...
Nick Udell's user avatar
  • 5,197
6 votes
2 answers
1k views

Writing an IRC Bot from scratch

I have been learning C# for a couple years now, and using small projects to help myself learn. My most recent project is a complete rewrite of my first C# project that just got out of hand (the old ...
Chris Woodward's user avatar
4 votes
2 answers
6k views

Split string by substring without using String.Split()

The Aim Since I very rarely write code to do things other than business logic anymore I've set myself a challenge: Split a string into a list of substrings by splitting on a matching string, without ...
Underscore's user avatar
9 votes
3 answers
3k views

ImmutableList implementation in C#

I tried to implement an immutable list. ...
Rezo Megrelidze's user avatar
4 votes
3 answers
630 views

Thread safe cache for write through and writeback

This cache is like a list where new elements are inserted in the middle, cache hits are put to head of the list and replaced elements are taken from the end. Would I just use a list the lookup would ...
aggsol's user avatar
  • 404

15 30 50 per page