-
Recent Posts
Recent Comments
- Alper Sunar on Presenters, Use Code Snippets for Live Coding
- Carlos Ribas on Presenters, Use Code Snippets for Live Coding
- rsanchez1 on Presenters, Use Code Snippets for Live Coding
- John Teague on Presenters, Use Code Snippets for Live Coding
- Carlos Ribas on Presenters, Use Code Snippets for Live Coding
Archives
- May 2013
- March 2013
- January 2013
- November 2012
- June 2012
- May 2012
- March 2012
- February 2012
- December 2011
- November 2011
- October 2011
- August 2011
- July 2011
- June 2011
- May 2011
- March 2011
- December 2010
- August 2010
- June 2010
- March 2010
- February 2010
- January 2010
- November 2009
- October 2009
- August 2009
- June 2009
- October 2007
Categories
Meta
Category Archives: C
Prototyping with anonymous classes
In the last post, I presented a rather strange bit of code: public static class ExpressionExtensions { public static Expression<Func<T, TResult>> Expr<T, TResult>( this T item, Expression<Func<T, TResult>> expr) { return expr; } } It looks like a rather pointless … Continue reading
Trivia Friday
Everybody loves a cliffhanger, right? I found myself needing to write the following code the other day: public static class ExpressionExtensions { public static Expression<Func<T, TResult>> Expr<T, TResult>( this T item, Expression<Func<T, TResult>> expr) { return expr; } } Why … Continue reading
Autoprojecting LINQ queries
Something I’ve been looking at adding to AutoMapper was the idea of doing automatic query projection in the Select query projection in LINQ statements. One downside of AutoMapper is that projection from domain objects still forces the entire domain object … Continue reading
Hiding Sensitive Information With A Base64 Encoded Dictionary And Binary Serialization
I’ve been back in C# land for the last few weeks writing a small Winforms application that runs from a USB thumb drive. Need To Hide Some Data? We have a need to store some slightly-sensitive information that changes … Continue reading
Good Refactoring / Patterns For Simple UI Logic?
I’ve got a chunk of C# that sits inside of a very simple form. The form downloads an update from a web page – one of two possible downloads, based on which one is available – and shows a message … Continue reading
Asynchronous Control Updates In C#/.NET/WinForms
Every .NET WinForms project I’ve written, since .NET 2.0, has included some form of this code: public static class ControlExtensions { public static void Do<TControl>(this TControl control, Action<TControl> action) where TControl: Control { if (control.InvokeRequired) control.Invoke(action, … Continue reading
Hello World in C, Dev Setup
As mentioned, I’m learning C, and I’ve achieved hello-world, plus recursive calculations of factorials and some data structures. Whee. :) For those playing along at home, I’ll describe my dev setup. But first, an unexpected discovery: Counter to my intuition, … Continue reading
Dipping into C
I decided on Monday that I should learn C. Cultivate a nodding acquaintance, at any rate. Louis is always prodding me to become a better craftsman, to become more proficient with my tools. So I figured I should understand my … Continue reading
Also posted in books
8 Comments
A Response To “What Is An Interface” By John Sonmez
this started out as a very lengthy reply to john sonmez’ post on What Is An Interface. There’s enough that I want to say that I think it warrants me posting on my blog instead of blogging in his comment … Continue reading
A Less Ugly Switch Statement For C#
I know switch statements are considered “evil” because they are very procedural code, they violate the Open-Closed Principle, etc etc. But every now and then I don’t see a need to do anything more than a switch statement because the … Continue reading
