Adam K Dean

Posts

Cycling through a list, one step at a time

Published 29 December 2010 in archive with tags csharp , collections So the project I am currently working on will have a list of servers (nodes) stored in a generic list (for now), and the node controller will need to cycle through these and send out a request to each one before getting back to the original one. This way, the load can be balanced out among the various nodes. Continue reading …

Private set property - public get, private set

Published 29 December 2010 in archive with tags csharp Just come across something I haven't needed before, a property read-only from the outside, but writeable from the inside.. I present to you the private set property! Continue reading …

Ctrl+A Select all text in a text box

Published 17 December 2010 in archive with tags winforms , csharp Another quick-snip here. Add select all (ctrl+a) to a regular textbox in less than 7 seconds, and here's how. Using the KeyDown event, look for control and A, and then select all, suppressing the keypress to stop the pingggggg noise: Continue reading …

Non-blocking Console.ReadKey()

Published 16 December 2010 in archive with tags csharp , consoleapplication Just a quick snippet for today. Continue reading …

Regex split by spaces except inside quote marks

Published 9 November 2010 in archive with tags regex , csharp Here's a nifty little bit of code I just wrote while writing a console input handler. Sometimes you will want to split up a string by a space, but then how do you input more than one word as a single argument? You put it in quote marks, but then how do you split those separately? Like this: Continue reading …



Newer Page 39 of 42 Older