An app can control the version of the .NET Framework on which it runs, but a component cannot. Components and class libraries are loaded in the context of a particular app, and therefore automatically run on the version of the .NET Framework that the app runs on.

In CLR 4

  • If a project contains reference of higher CLR (.NET 3.5(console app) referencing .NET 4.0(assembly)), then project won’t compile.
  • If a project contains the reference of lower CLR (.NET 4.0(console app) referencing .NET 3.5(assembly)), then the project will compile.
  • The Same concept is applied for .NET versions. The Higher version can always reference, assemblies of lower version but not vice versa.

But is it different In CLR 2

  • If a project contains a reference of higher CLR (.NET 2.0(console app) referencing .NET 3.5(assembly)), then the project will compile.
  • If a project contains a reference of lower CLR (.NET 3.5(console app) referencing .NET 2.0(assembly)), then the project will compile.
  • The Same concept is applied for .NET versions. The Higher version can always reference, assemblies of lower version and vice versa.

 

Share Button

We can plug and unplug any electrical appliances in sockets. Even though nothing is plugged in, the wall doesn’t explode

Read More →

Share Button

Usually, we don’t wire electrical appliances together by attaching the cable directly to the wall. Instead, we use plugs and sockets. A socket defines a shape that the plug must match. In an analogy to software design, the socket is an interface.

Read More →

Share Button

If you ever stayed in cheap hotel, you will see hair drier directly attached into the wall outlet.

Tight coupling

Now couple of problems here.

  • What if your hair drier stopped working?
  • What if hotel management decided to switch to new model which consumes less power?

Read More →

Share Button

AlwaysOn Availability Groups and AlwaysOn Failure cluster Instances are new features, introduced in SQL Server 2012, that promise the highest level of availability and disaster recovery. Read More →

Share Button

The term Inversion of Control (IoC) is a computer programming technique wherein the flow of the control of an application is inverted. Rather than a caller deciding how to use an object, in this technique the object called decides when and how to answer the caller, so the caller is not in charge of controlling the main flow of the application. Read More →

Share Button

Often, String objects are used to contain sensitive data such as a user’s password or creditcard information. Unfortunately, String objects contain an array of characters in memory, and if some unsafe or unmanaged code is allowed to execute, the unsafe/unmanaged code could snoop around the process’s address space, locate the string containing the sensitive information, and use this data in an unauthorized way. Even if the String object is used for just a short time and then garbage collected, the CLR might not immediately reuse the String object’s memory (especially if the String object was in an older generation), leaving the String’s characters in the process’s memory, where the information could be compromised. In addition, since strings are immutable, as you manipulate them, the old copies linger in memory and you end up with different versions of the string scattered all over memory.
Read More →

Share Button

An innovative new JavaScript library that guarantee to bring most enjoyable experience to client side development. KO library provides MVVM (Model-View-View Model) framework.

  • Model: Objects in business domain
  • View: User interface that is visible to user
  • ViewModel: Code representation data/operation on UI

Read More →

Share Button