Tag Archives: dotnet

Working with TypeCatalog in MEF

By | August 29, 2011

In MEF world, we use Types to define Export or Import. Catalogs are used to discover types in an assembly, Directory, or manually added types in TypeCatalogs. Today I will discuss how TypeCatalog works and how you can use it in your application. TypeCatalog is actually a repository of Types that forms the basic Export and Import parts.… Read More »

Could not load file or assembly ‘PresentationCore’ or one of its dependencies. An attempt was made to load a program with an incorrect format. : A solution

By | July 3, 2011

Few days back, I was migrating my application for VS2008 to VS2010 and it was done successfully except  some people started running the application. They faced the error as below “Could not load file or assembly ‘PresentationCore’ or one of its dependencies. An attempt was made to load a program with an incorrect format. “ I tried to… Read More »

Compiler directive #Pragma reference

By | June 5, 2011

Compiler directives is always a fun for any language. There are lots of talks around different blogs on compiler directives but there are hardly any talks around my favorite #pragma directives. So lets talk what it is and what it is capable of. In general, Pragma directives are special instruction to the compiler when it compiles a file.… Read More »

Collection Initializers in .NET

By | March 25, 2011

Many of you have used property initializers in your code. Object initializers and property initializers are common operations of every program. But do you know, .NET supports Collection initilization directly for all IEnumerable objects ? In this post lets take a brief introduction of Collection Initializers in .NET. Suppose you want to create an array which holds some… Read More »