Home of the AlmostImplementedException

September, 2013

For vs Foreach

Sometimes, especially with C# you hear alot of “common knowledge” about performance and developers mistakes. As an (bad) example I want to refer to 8 Most common mistakes C# developers make and in particular point 7 “using foreach instead of for”. So whats wrong with this kind of post? First of all, it refers to […]

Difference between a duck

Today we introduce a new category on Difference between a duck. We took that line from the movie Postal. And the category is about things that are the same or look alike and also about things other think are the same but actually they are different. For a start I’ll show that for and […]

How to use SlidingExpiration AND AbsoluteExpiration at the same time

As I mentioned in the last post, you can’t use SlidingExpiration and AbsoluteExpiration a the same time. Thats by design. Thanks again, Microsoft. But there is a workaround. First i will present the solution and then a short and easy way to use it. The ObjectCache / MemoryCache has a nice little function called CreateCacheEntryChangeMonitor. […]

, , ,

WCF-Standalone: Webservices without IIS

The Windows Communication Foundation (WCF) is one of the best things Microsoft ever did for us. Whoever tried to build a Webservice, especially with REST and SOAP and then worked with WCF know what i mean. But today i just want to show you, how a WCF-Service can be used without an IIS and event […]

, , , ,

Singleton evil or not?

Its not in the genes its the environment! They are not evil just misunderstood. Yeah, ok you get it 😀 Singletons are a very special type of objects and should be treated like that. There is no general pattern to implement and no keyword to identify them. So what the heck is a singleton? A […]

Bit-Flags with enums

Today i want to show you how to use enumerations to set multiple values in a variable using bit-flags. Normaly enums are an easy way to set a single value and check later which value is set working with a static name throughout your entire application. Enums are much better then magic numbers or constants […]

, , ,

Previous Posts