How to convert UTF7 string into ANSI in C#

The simplest way to transforming a UTF-7 encoded string is to use the .net System.Text.Encoding abstract class. It internally uses System.Security class library to provide the transform we are targeting for like ASCII, BigEndianUnicode, Unicode, UTF32, UTF7, and UTF8. [More]

C# Delegate – a silent hero behind modern programming

Delegate plays an important role in today's programming model where it is extensively used in Parallel Programming, Asynchronous Programming, PLINQ, Events & Callback methods, Func, Action, Predicates and so on. [More]

Asynchronous and Parallel Programming

In case of Parallel programming, there must be multiple threads otherwise how can that get processed/done in parallel. In this case programmer have more control over threads/cores of CPUs. If we say that Asynchronous is of no-wait time & continuous execution then this clears itself that we all talking about a Single threaded mechanism. [More]

Const vs Readonly in C#

In short, when an expression references a constant, the value of constant is obtained at compile time only, it means all expressions replaced with constant value. But, If expression is referencing a Readonly field then the value of field is obtained at runtime. [More]

How to use Data Access Application Block – Enterprise Library

This sample solution has a website, class library for Data Transfer Objects and a class library for Data Access. It is simple solution targeted to explain the usage of DAAB so it doesn’t have more layers and complexity. We will call a data access method directly from our website and that data access method will use DAAB to process our request. [More]

Database provider factory not set for the static DatabaseFactory

Database provider factory not set for the static DatabaseFactory. Set a provider factory invoking the DatabaseFactory.SetProviderFactory method or by specifying custom mappings by calling the DatabaseFactory.SetDatabases method. New Enterprise Library version 6 requires to set for factory method if we are using xml configuration files to configure application blocks. [More]

Microsoft Enterprise Library 6 - new release

Microsoft has released Enterprise Library version 6.0 in April-2013. Enterprise Library is more robust framework or class library written with performance and resource management best practices. Instead of reinvesting the wheel for data access framework, or other, you can easily plug-in this library into your application. It has blocks for Windows Azure or cloud specific also.Enterprise Library is basically a collection of application blocks. These application blocs are for helping developers by providing reusable components (for example, Data Application Block deals for common data access jobs). These blocks are easy to plug-in into projects. [More]

Organized and presented at C# Corner Chandigarh Chapter meet on 03-August-2013

Being a Chapter Lead, I organized this event with help of executive members on technology discussion so named it “Technology Day”. We did this meeting on 3rd August at Unit Nexus Corporation, Zirakpur with help from SSS & Educational Society, Gorakhpur. [More]

Prevent anonymous access to hosted WCF service

We can stop non authorized users access to our hosted WCF services by applying some sort of techniques. WCF doesn't provide us any direct On and Off mechanism for valid and invalid access. [More]

What is SignalR ?

SignalR is new buzz in development technology. It is not going to replace asp.net but works for asp.net. It is a technology ( in more technical words it is a library) that facilitate us to add real-time functionality into our asp.net based applications. It is very useful where high time/real time update is required like online group gaming, chat, stock trade etc. [More]