Monthly Archives: November 2014

How to delete node in XML using XElement C#

This article is showing you how to delete a node using XElement. This article is extended from the Write XML Tree to XML file (LINQ to XML) with sub child (https://chanmingman.wordpress.com/2014/10/24/write-xml-tree-to-xml-file-linq-to-xml-with-sub-child/). In previous article we form the XML node using … Continue reading

Posted in .Net | Tagged , , , | Leave a comment

How to generate the connection string for MS SQL Server

This short article is showing how to use the workaround to generate the connection string for MS SQL Server. First you follow the link to create an ADO.NET Entity Model or you can call it Entity Framework model https://chanmingman.wordpress.com/2013/04/21/creating-ado-net-entity-data-model-in-vs-2012/. After … Continue reading

Posted in .Net | Tagged , , | Leave a comment

async and await c#

This article is to build a sample common async and await block. It is a bit tricky and need to be careful when using async and await. I have copy and paste http://msdn.microsoft.com/en-us/magazine/jj991977.aspx and  http://msdn.microsoft.com/en-us/library/hh556530.aspx to construct a console project … Continue reading

Posted in .Net | Tagged , , | Leave a comment

Bubble sort using C#

This short article is showing you how to write the simplest sort algorithm, Bubble sort, using C#. Let I mentioned in my Quicksort article. The sorting method is built in to C# collection today. Somehow for learning we still need … Continue reading

Posted in Uncategorized | Leave a comment

Quicksort using C#

This article will look at how quicksort works and the code in C#. Today you can sort an array without knowing what is behind the scene. For example, you can sort an array like the below. String[] words = { … Continue reading

Posted in .Net | Tagged , | Leave a comment

Transform from XML to HTML

This article show how to transform from XML to HTML by using XslCompiledTransform. To do this you can use XslCompiledTransform like below. // Load the style sheet. XslCompiledTransform xslt = new XslCompiledTransform(); xslt.Load(“output.xsl”);   // Execute the transform and output … Continue reading

Posted in .Net | Tagged , , | Leave a comment

What is new in VS 2015 ASP.NET

Happy to see Webform 4.6 is supporting HTTP 2.0 and Async binding. Before I can come out with the VS 2015 solution, I would post the resources here for you to check out. Webform 4.6 http://channel9.msdn.com/Events/Visual-Studio/Connect-event-2014/812 ASP.NET 5 for .NET … Continue reading

Posted in .Net | Tagged , , , | Leave a comment