Category Archives: .NET 4.5

Connect IoT Devices by using RabbitMQ and MQTT.

There is a growing change in the software world these days, due to increase of IoT devices. We live in a world where real time information is important, and one of the challenges that software projects dealing with is how … Continue reading

Posted in .NET, .NET 4.5, C# 6, MQTT, RabbitMQ | Leave a comment

Async programming and scalability with C# 5

What is Scalability? Scalability is the ability of a system to expand to meet your business needs. You scale a system by adding extra hardware or by upgrading the existing hardware without changing much of the application. In the context … Continue reading

Posted in .NET, .NET 4.5, C# 5 | Leave a comment

Closures in c#

As a c# developers we write a lot of lambda expressions. And with lambda expressions we can access variables outside the expression block. For Example: class Program { static Func<int,int> Add; static void Main(string[] args) { int x = 5; … Continue reading

Posted in .NET, .NET 4.5, C# 5 | Tagged | Leave a comment

IDispose and Finalize relations in .NET

What is IDispose in .NET? The IDispose interface gives the programmer way to free unmanaged resources and events handlers, in order to avoid memory leaks. For example: public class UnmanagedResourceUser :IDisposable { public void Dispose() { //Free unmanaged resources } … Continue reading

Posted in .NET 4.5 | Tagged | Leave a comment

What’s the difference between Task.ContinueWith and await?

In the .NET there are many ways to implement asynchronous programs. We can use the Task, Task<T> or await keyword to write asynchronous programs. For Example: Task<IPAddress[]> addresses = Dns.GetHostAddressAsync(“msdn.com”); addresses.ContinueWith(parameter =>      { IPAddress[] ipAddresses = addresses.Result; }); As … Continue reading

Posted in .NET, .NET 4.5, C# 5 | Leave a comment

My Advices for Parallel and Async programming.

The biggest reason I’m writing this post, is when I started to write async and await pattern,there were few questions about this pattern, and this post going to explore them. What is the difference between Parallel and Async? To answer … Continue reading

Posted in .NET 4.5, C# 5 | Leave a comment

Little Difference between c#4 and c#5 compiler

What is the difference between outside declared variable and inside declared variable? Case1: Outside: var i_ = default(int); foreach (var i in new[] { 0, 1, 2, 3, 4, 5 }) { i_ = i; Console.WriteLine(i_); } Inside: foreach (var … Continue reading

Posted in C# 5 | Leave a comment