Find File Snippet – Depth First And Breadth First Search

Two usefull snippets, if you need to do a quick file search, here a recursive and a breadth first implementation (ignored the not-authorized-exception):
(took me only 2 mins, love .Net 🙂

Depth First Implementation:

static string[] FindFile_DepthFirst(string directoryName, string fileName)
   return Directory.GetFiles(directoryName, fileName, SearchOption.AllDirectories);

Breadth First Implementation:
Continue reading

Update GUI Control From Non-GUI-Thread Without Marshalling

In .Net when you want to update a GUI Control, for example a ListView, you have to execute your update code in the GUI Thread which controls your Form and its child GUI Objects. While you are in another Thread, you call the Invoke or BeginInvoke (for async.) method of your GUI Control for this purpose. You pass this method a delegate of your method, which contains your update code, and the GUI Thread invokes the method that is passed. Well the whole story is infact much more complicated and this article gives you a nice in-depth view on this topic:
WinForms UI Thread Invokes: An In-Depth Review of Invoke/BeginInvoke/InvokeRequred


This is how Microsoft wants us to manage our GUI stuff, Continue reading

How to Upload a Folder Recursive to FTP and display the Progress

I found a nice open-source FTP-Library that can upload files, change the directory etc.  (ftpLib.cs was originally written by Jaimon Mathew and modified by Dan Rolander and others).

But it lacks the feature to upload a Directory recursiv, therefore i coded a class with some Extension Methods.

I also made up a small Example:

Continue reading


I often encounter a problem when downloading my daily tv show in form of rar parts. When doing that i want to open the video file already while downloading (like streaming).

Therefore i made up a small application that clicks the button of the rar application every 1,5s.


Because of that i can watch the partial extracted movie with VLC (i guess several other players can do that too).

The code of the Application basically consists of two functions:
Continue reading

LeetSocket – Usage Introduction

Im happy to present you one of our current Projects: Leetsocket.
Leetsocket is a Socket Component written in c# .Net. Its built upon TCP/IP. What makes this Component special is, that you can build Client-Server applications with it, in which you can send any type of data easily without needing to implement any protocolls for sending and receiving or without needing to have any complex knowledge about sockets, working with byte arrays or whatever. Leetsocket sends objects serializing them into byte arrays according its intern binary protocoll. This Component enables you to use many cool features, such as sending files, pausing sendings or even sending things parallely.
Continue reading