Archive for the 'C#' Category

05
Aug
09

Undocumented C#

Interesting (though useless) undocumented C# keywords (and corresponding IL instructions) described in Calling printf from C# – The tale of the hidden __arglist keyword on Bart De Smet’s B# .NET Blog.

02
Aug
09

Threading in C#

Joseph Albahari, the author of C# 3.0 in a Nutshell, C# 3.0 Pocket Reference, and LINQ Pocket Reference as well as LINQPad, has very nice Threading in C# article (well, it is 77 pages long and available in PDF format as well). As the author says, “[it] tackles difficult issues such as thread safety, when to use Abort, Wait Handles vs Wait and Pulse, the implications of Apartment Threading in Windows Forms, using Thread Pooling, Synchronization Contexts, Memory Barriers and non-blocking synchronization constructs.”

31
May
09

Today’s Sites/Blogs

02
Mar
09

“Bit Twiddling”

Needed to do some “weird” things recently that involved bit operations, e.g. to create masks with certain number of bits set. During my “research” I found few interesting places:

15
Dec
08

Managed Windows API

Managed Windows API is a collection of C# components that wrap Windows API functionality – a nice addition to pinvoke.net.

03
Oct
08

Appropriate Use of Type Inference or (2 var | ! 2 var)

Type inference is a new C# feature allowing one to declare variable in a type safe way, while “saving typing”. As it is a new feature, there are still going debates (sometimes heated) about appropriate uses of type inference. When to use Type Inference on jaredpar’s WebLog represents the “use it whenever it’s possible” camp, while Appropriate use of Local Variable Type Inference on B# .NET Blog (really nice blog indeed!) represents the “use it only when it’s absolutely clear what the type is” camp. My view coincides with that expressed in the latter article, i.e. “use it only when it’s absolutely clear what the type is”. Especially, one starts to value this approach in case one has to read the code written by someone else: it is sometimes (usually?) difficult to grasp what that code is doing, and then on top of that one has to figure out what are the actual types of variables. Brrrrrrr…

08
Aug
08

Today’s Links

These are mostly related to systems’ programming:

12
Jul
08

Today’s Sites/Blogs

  • The Wayward WebLog – a lot of LINQ info (e.g. “LINQ: Building an IQueryable Provider” series)
  • …Removing All Doubt by Chuck Jazdzewski (already had it in my blog) – advanced C# topics, functional programming, generics, etc.
11
Jul
08

Today’s Sites/Blogs

10
Jul
08

Today’s Sites/Blogs

12
May
08

PostSharp

PostSharp is a free and open source aspect-oriented programming (AOP)/policy injection framework that can reduce the number of lines of code and improve its logical decoupling by allowing encapsulation of e.g. transaction management, logging, caching, or security aspects as custom attributes. Own custom attributes can be developed that will add new behaviors to code.