Sorting for an ObservableCollection

I am porting my Live Countdown app to Windows 8 in order to help my learn Windows 8 and to spread the goodness to more people :)

However one problem I had was sorting an ObservableCollection without causing it to reset. I got round this issue by implementing the QuickSort algorithm as an extension method so I could do in place sorting on the collection.

Continue reading

Getting file path with capitals included 2

I previously posted a class that would get a files path including the correct capitals. I have since found a better way to do this by using the shell functions in Windows. I didnt create this method, I FOUND it. Its from a very clever windows programmer who does a site called http://codegator.com/.
To use this method, simple do:

CGPidl pidl = new CGPidle(path);
string filesRealPath = pidl.PhysicalPath;

How this helps people. It should be a lot faster than the last way I posted.
Continue reading

Getting a files path with capitals included

Came across a post on the Microsoft forum which was looking to find out whether there was a way to get the Path of a file or folder on disk including all the capital letters. Incase you didnt know, the FileInfo and DirectoryInfo use the string you pass in to get them as the FullName property and dont actually check the file on disk at all until you call a function like Exists() which requires them too.
I couldnt see a framework based way to do this so I made this little class to do it. It has a static method you can pass a file or folder path and it will return the path with the case. Continue reading