AppDomain.CurrentDomain.SetupInformation for .NET application using C#

AppDomain.CurrentDomain.SetupInformation property provides some general information about the currently executing assembly. This can provide more information about the assembly binding information for current instance of AppDomain used. Above property results instance of type AppDomainSetup class. Few properties you may find interesting about the currently executing assembly are as…

Use UTF-8 encoding for StringWriter in C#

All .NET string is in Unicode (UTF-16) encoding format. So when you are using StringWriter to create your XML it will use UTF-16 encoding. Example when creating XML : var serializer = new XmlSerializer(yourModel.GetType(), string.Empty); var stringBuilder = new StringBuilder(); using (var stringWriter = new StringWriter()) { serializer.Serialize(stringWriter, yourModel); stringBuilder.…

Monitoring data change using SqlDependency and C#

What is SqlDependency? As the word describes itself, it is used to notify your application or user when certain criteria or condition is satisfied. This condition (query in technical terms) is provided to SQL notification service to be observed upon and ask to be notified when the condition is met…

Stop Slumdog Blogging

What is wrong with you people? Slumdog blogging? Seriously? Answer.com says Slumdog is – Basically a poor kid coming from poverty stricken areas. I am not criticizing the authors who really can’t afford. But it seems most of them are ignorant enough. Why Blog? Everyone will definitely have one…