Honest Illusion

Where Lightning's Still the Biggest Thrill of All...

Code'n'Stuff from James Curran, simple country programmer.
Welcome to Honest Illusion Sign in | Join | Help
in Search

Browse by Tags

All Tags » Code » C#
Showing page 3 of 3 (25 total posts)
  • Generics without Collections, pt. 2

    My previous article on this subject dealt with creating a lazy-loaded data type.  But, if you think about it, that's realy just a collection, with just one item.  I promised you use of generics without collections, so let's move this to the next step, using the type to affect the behavior of the code, without ever storing an object of that ...
    Posted to Honest Illusion (Weblog) by James on November 7, 2006
  • Wordwrapping in C#

    Some time ago, I needed a function that would take a block of text, and word-wrap it at a specific line length. As apparently you have now done, I googled for it, and found a blog with a seemingly appropriate algorithm.  Except it wasn't.  I immediately noticed that it wasn't very efficient -- but that was merely annoying.  It wasn't grave ...
    Posted to Honest Illusion (Weblog) by James on October 6, 2006
  • Generics without Collections

    Having moved to C# after years of being a C++ programmer, I was quite happy when generics were added to C#. I could finally do some of the things I was doing before with C++'s templates. However, I noticed something about how C# programmers were using generics --- In fact, it was exactly the way C++ programmer were using templates when they ...
    Posted to Honest Illusion (Weblog) by James on October 2, 2006
  • Performance optimization of an if/else-statement

    Mads Kristensen wrote on the subject on if/else statements in C#, running time benchmarks on code such as this: private bool RunIf(string input)   {     if (input == ''hello'')       return true;     else if (input == ''jelly'')       return true;     else       return true;   } I wrote an analysis in the comments in his blog, but I ...
    Posted to Honest Illusion (Weblog) by James on September 9, 2006
  • Custom Exception template for MyGeneration

    Based on a CodeSmith template (v1.4) by Lance Hunt.
    Posted to MyGeneration (FileGallery) by James on August 31, 2006
Powered by Community Server (Personal Edition), by Telligent Systems