6 Important .NET Concepts: Stack, Heap, Value types, Reference types, Boxing and Unboxing
This article will explain 6 important concepts Stack, heap, value types, reference types, boxing and unboxing. This article starts first explaining what happens internally when you declare a variable and then it moves ahead to explain 2 important concepts stack and heap. Article then talks about reference types and value types and clarifies some of the important fundamentals around them. Finally the article concludes by demonstrating how performance is hampered due to boxing and unboxing with a sample code.
C#-like expression evaluator and type converter
Convert types, parse and evaluate expressions in runtime, in .NET 2.0
Grid computing using C# Script and .NET Remoting
Using C# script engine inside network using .net remoting.
Parallel Computing Concepts via C# 4.0
.NET 4.0 has kept in step with the computing industry's quest for density. There has always been a quest to enhance performance while accomplishing more in a shorter period time period. Parallel LINQ, the Parallel class, the task parallelism constructs, and the concurrent collections are new to Framework 4.0 and are collectively known as PFX (Parallel Framework). The Parallel class together with the task parallelism constructs is called the Task Parallel Library or TPL. This is a necessary addition to .NET is because CPU clock speeds have stagnated and manufacturers have shifted their focus to increasing core counts. This is problematic for us as programmers because our standard single-threaded code will not automatically run faster as a result of those extra cores. That being the case, this article will take a look a parallel programming as done in the C# 4.0 language and the .NET 4.0 runtime.
C# - Delegates 101 - A Practical Example
A practical example not too simple, not too complex, to explain delegates
The Dynamic Keyword in C# 4.0
One of the primary aims in C# 4.0 is to increase support for dynamic languages which are making their way into the framework and naturally the dynamic keyword plays an important part…
COM Interop Gets Much Better in C# 4.0
Enhanced COM interop through C# 4.0's dynamic type system, support for named and optional parameters, and for variance makes working with Microsoft Office and other Primary Interop Assemblies much easier.
An Overview of Partial Classes and Partial Methods
Partial classes and partial methods are two programming language features of .NET programming languages that make it possible for developers to extend and enhance auto-generated code. In a nutshell, a partial classes allow for a single classs members to be divided among multiple source code files.
At compile-time these multiple files get combined into a single class as if the classs members had all been specified in a single file. Partial methods are methods defined in a partial class that are (optionally) divided across two files. With partial methods one file contains the method signature - the method name, its return type, and its input parameters - while the body is (optionally) defined in a separate file. If the partial methods body is not defined then the compiler automatically removes the partial method signature and all calls to the method at compile-time…
C# #warning and #error Directives
In some situations you may wish to purposefully cause compilation errors or warnings in your code. For example, a warning indicating that you are compiling in debug mode or an error for deprecated code. These can be added using preprocessor directives.
Tracing Events Raised by Any C# Object
.NET Reflection turned out to be a very easy way to get access to the definition of the class I was interested in—or any other class for that matter. It is a simple process to get all the events that a class declares, and then to attach handlers to any or all of the events.
This article presents the simple-but-general event hooking/tracing class I built, which is provided (with a demo) as a download.