<?xml version="1.0" encoding="UTF-8" standalone="no"?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0"><channel><title>Code Junction</title><description>A Site Dedicated to Computer Programs Code,Computer Tips and Tricks,Internet Tips and Tricks,Computer Knowledge,Computer and Internet Guide,Printer Guide,AntiVirus Guide,Boost up Computer,Computer Protection, Anti Spam and related articles.</description><managingEditor>noreply@blogger.com (Unknown)</managingEditor><pubDate>Thu, 26 Mar 2026 05:46:32 +0530</pubDate><generator>Blogger http://www.blogger.com</generator><openSearch:totalResults xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">111</openSearch:totalResults><openSearch:startIndex xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">1</openSearch:startIndex><openSearch:itemsPerPage xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/">25</openSearch:itemsPerPage><link>http://codejunction.blogspot.com/</link><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle>A Site Dedicated to Computer Programs Code,Computer Tips and Tricks,Internet Tips and Tricks,Computer Knowledge,Computer and Internet Guide,Printer Guide,AntiVirus Guide,Boost up Computer,Computer Protection, Anti Spam and related articles.</itunes:subtitle><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><title>C# code to download a file from a website URL</title><link>http://codejunction.blogspot.com/2014/11/c-code-to-download-file-from-website-url.html</link><category>.Net</category><category>.Net 4.0</category><category>.Net 4.5</category><category>.Net 4.5.1</category><category>C#</category><category>C# Code</category><category>C# Sample code</category><category>Download</category><category>WebRequest</category><author>noreply@blogger.com (Unknown)</author><pubDate>Thu, 27 Nov 2014 22:30:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-4262425499748775765</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Hi All,&lt;br /&gt;
Yesterday one of my colleagues was having issue with downloading a file from URL using c# for one of the projects. This is a general requirement for many projects and thought it would be helpful if I post here.&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;using System;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;using System.IO;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;using System.Net;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;using System.Text;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;namespace FileDownloadSample&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;{&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; class Program&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; static void Main(string[] args)&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; HttpWebRequest request = (HttpWebRequest)WebRequest.&lt;wbr&gt;&lt;/wbr&gt;Create("&lt;a href="https://www.yoursite.com/yourfile.pdf" target="_blank"&gt;https://www.yoursite.com/&lt;wbr&gt;&lt;/wbr&gt;yourfile.pdf&lt;/a&gt;");&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request.Method = "GET";&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var encoding = new UTF8Encoding();&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request.Headers.Add(&lt;wbr&gt;&lt;/wbr&gt;HttpRequestHeader.&lt;wbr&gt;&lt;/wbr&gt;AcceptLanguage, "en-gb,en;q=0.5");&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request.Headers.Add(&lt;wbr&gt;&lt;/wbr&gt;HttpRequestHeader.&lt;wbr&gt;&lt;/wbr&gt;AcceptEncoding, "gzip, deflate");&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request.Accept = "text/html,application/xhtml+&lt;wbr&gt;&lt;/wbr&gt;xml,application/xml;q=0.9,*/*;&lt;wbr&gt;&lt;/wbr&gt;q=0.8";&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; request.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0";&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; var resp = (HttpWebResponse)request.&lt;wbr&gt;&lt;/wbr&gt;GetResponse();&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using (var stream = File.Create("TargetFileName.pdf"))&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; resp.GetResponseStream().&lt;wbr&gt;&lt;/wbr&gt;CopyTo(stream);&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;&amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: arial, sans-serif; font-size: 13px;"&gt;
&lt;i&gt;&lt;span style="color: #274e13;"&gt;}&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>How to Replace characters at specified position and line in UNIX</title><link>http://codejunction.blogspot.com/2014/08/how-to-replace-characters-at-specified.html</link><category>SED</category><category>UNIX</category><author>noreply@blogger.com (Unknown)</author><pubDate>Thu, 14 Aug 2014 13:59:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-7565895604789700051</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div dir="ltr" id="imcontent"&gt;
&lt;span dir="ltr" style="direction: ltr; font-family: 'Segoe UI'; font-size: 10pt; word-wrap: break-word;"&gt;&lt;pre style="background-color: #eeeeee; border-color: rgb(0, 0, 0); border-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; font-size: 13px; line-height: 18px; margin-bottom: 10px; vertical-align: baseline;"&gt;&lt;code style="border-width: 0px; margin: 0px; vertical-align: baseline;"&gt;sed -n -e 24p -e 24q | cut -c27-34
sed -n '24p;24q' | cut -c27-34&lt;/code&gt;&lt;/pre&gt;
&lt;div style="background-color: white; border-color: rgb(0, 0, 0); border-width: 0px; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 1em; vertical-align: baseline;"&gt;
The&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; vertical-align: baseline;"&gt;-n&lt;/code&gt;&amp;nbsp;option means 'do not print lines by default'; the&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; vertical-align: baseline;"&gt;24p&lt;/code&gt;&amp;nbsp;means print line 24; the&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; vertical-align: baseline;"&gt;24q&lt;/code&gt;&amp;nbsp;means quit after processing line 24. You could leave that out, in which case&amp;nbsp;&lt;code style="background-color: #eeeeee; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; margin: 0px; vertical-align: baseline;"&gt;sed&lt;/code&gt;&amp;nbsp;would continue processing the input, effectively ignoring it.&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total></item><item><title>DoEvents in WPF </title><link>http://codejunction.blogspot.com/2014/08/doevents-in-wpf.html</link><category>.Net 4.0</category><category>.Net 4.5</category><category>.Net 4.5.1</category><category>DoEvents</category><category>Silverlight</category><category>WPF</category><author>noreply@blogger.com (Unknown)</author><pubDate>Thu, 7 Aug 2014 15:34:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-7847857455689896018</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div style="background-color: white; border: 0px; color: #444444; font-family: 'Segoe UI', Tahoma, Verdana, Arial; font-size: 13px; line-height: 17px; margin: 0px; outline: 0px; padding: 0px;"&gt;
Below is the equivalent of Doevents in WPF&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #444444; font-family: 'Segoe UI', Tahoma, Verdana, Arial; font-size: 13px; line-height: 17px; margin: 0px; outline: 0px; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #444444; font-family: 'Segoe UI', Tahoma, Verdana, Arial; font-size: 13px; line-height: 17px; margin: 0px; outline: 0px; padding: 0px;"&gt;
public static void DoEvents()&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #444444; font-family: 'Segoe UI', Tahoma, Verdana, Arial; font-size: 13px; line-height: 17px; margin: 0px; outline: 0px; padding: 0px;"&gt;
{&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #444444; font-family: 'Segoe UI', Tahoma, Verdana, Arial; font-size: 13px; line-height: 17px; margin: 0px; outline: 0px; padding: 0px;"&gt;
&lt;span style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; white-space: pre;"&gt; &lt;/span&gt;Application.Current.Dispatcher.Invoke(DispatcherPriority.Background, new ThreadStart(delegate { }));&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #444444; font-family: 'Segoe UI', Tahoma, Verdana, Arial; font-size: 13px; line-height: 17px; margin: 0px; outline: 0px; padding: 0px;"&gt;
}&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #444444; font-family: 'Segoe UI', Tahoma, Verdana, Arial; font-size: 13px; line-height: 17px; margin: 0px; outline: 0px; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #444444; font-family: 'Segoe UI', Tahoma, Verdana, Arial; font-size: 13px; line-height: 17px; margin: 0px; outline: 0px; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #444444; font-family: 'Segoe UI', Tahoma, Verdana, Arial; font-size: 13px; line-height: 17px; margin: 0px; outline: 0px; padding: 0px;"&gt;
If you want to do it in a WPF UserControl Library or CustomControl Library then you can do as below:&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #444444; font-family: 'Segoe UI', Tahoma, Verdana, Arial; font-size: 13px; line-height: 17px; margin: 0px; outline: 0px; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #444444; font-family: 'Segoe UI', Tahoma, Verdana, Arial; font-size: 13px; line-height: 17px; margin: 0px; outline: 0px; padding: 0px;"&gt;
&lt;span style="border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; white-space: pre;"&gt; c&lt;/span&gt;ontrolname.Dispatcher.Invoke(DispatcherPriority.Background, new ThreadStart(delegate { }));&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #444444; font-family: 'Segoe UI', Tahoma, Verdana, Arial; font-size: 13px; line-height: 17px; margin: 0px; outline: 0px; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="background-color: white; border: 0px; color: #444444; font-family: 'Segoe UI', Tahoma, Verdana, Arial; font-size: 13px; line-height: 17px; margin: 0px; outline: 0px; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description></item><item><title> C#.Net - Handling special characters in XML strings</title><link>http://codejunction.blogspot.com/2014/07/cnet-handling-special-characters-in-xml.html</link><category>.Net</category><category>ASP.NET</category><category>C#</category><category>C# Code</category><category>C# Sample code</category><category>XML</category><author>noreply@blogger.com (Unknown)</author><pubDate>Tue, 1 Jul 2014 14:55:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-7429701024209079600</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div style="background-color: white; font-family: '';"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Because XML syntax uses some characters for tags and attributes it is not possible to directly use those characters inside XML tags or attribute values.&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: '';"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;To include special characters inside XML files you must use the numeric character reference instead of that character. The numeric character reference must be UTF-8 because the supported encoding for XML files is defined in the prolog as&amp;nbsp;&lt;span class="bold"&gt;&lt;strong&gt;encoding="UTF-8"&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;and should not be changed.&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: '';"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;The numeric character reference uses the format:&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; font-family: '';"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="literallayout" style="background-color: white; font-family: '';"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#nn;&amp;nbsp;&amp;nbsp;decimal&amp;nbsp;form&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #222222; line-height: 1.5; margin-bottom: 15px; padding: 0px;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#xhh;&amp;nbsp;hexadecimal&amp;nbsp;form&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #222222; line-height: 1.5; margin-bottom: 15px; padding: 0px;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small; line-height: 1.5;"&gt;We can use the&amp;nbsp;&lt;/span&gt;&lt;em style="font-family: Arial, Helvetica, sans-serif; font-size: small; line-height: 1.5; margin: 0px; padding: 0px;"&gt;&lt;span style="color: #000099; margin: 0px; padding: 0px;"&gt;SecurityElement.Escape&lt;/span&gt;&lt;/em&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small; line-height: 1.5;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small; line-height: 1.5;"&gt;method to replace the invalid XML characters in a string with their valid XML equivalent [1].&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #222222; margin: 0px; padding: 0px;"&gt;
&lt;div class="syntaxhighlighter  csharp" id="highlighter_464221" style="margin: 1em 0px !important; overflow-x: auto !important; overflow-y: hidden !important; padding: 0px; position: relative !important; width: 700px;"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0" style="-webkit-box-shadow: none !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: 700px;"&gt;&lt;tbody style="-webkit-box-shadow: none !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;
&lt;tr style="-webkit-box-shadow: none !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;&lt;td class="gutter" style="-webkit-box-shadow: none !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; color: rgb(175, 175, 175) !important; direction: ltr !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;&lt;div class="line number1 index0 alt2" style="-webkit-box-shadow: none !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-width: 0px 3px 0px 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;1&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1" style="-webkit-box-shadow: none !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-right-color: rgb(108, 226, 108) !important; border-right-style: solid !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border-width: 0px 3px 0px 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;2&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td class="code" style="-webkit-box-shadow: none !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: 670px;"&gt;&lt;div class="container" style="-webkit-box-shadow: none !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: relative !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;
&lt;div class="line number1 index0 alt2" style="-webkit-box-shadow: none !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;"&gt;
&lt;code class="csharp comments" style="-webkit-box-shadow: none !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; color: rgb(0, 130, 0) !important; direction: ltr !important; display: inline !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;//Usage&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1" style="-webkit-box-shadow: none !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;"&gt;
&lt;code class="csharp plain" style="-webkit-box-shadow: none !important; background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-shadow: none !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;srtXML = SecurityElement.Escape(strXML);&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style="background-color: white; color: #222222; line-height: 1.5; margin-bottom: 15px; padding: 0px;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Namespace: System.Security&lt;br style="margin: 0px; padding: 0px;" /&gt;Assembly: mscorlib (in mscorlib.dll)&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #222222; line-height: 1.5; margin-bottom: 15px; padding: 0px;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;I have used the HttpUtility classes UrlEncode and UrlDecode methods to handle cross-site scripting attacks and this also helped me to get rid of the XmlException – “Data at the root level is invalid”.&lt;/span&gt;&lt;/div&gt;
&lt;div class="literallayout" style="background-color: white;"&gt;
&lt;span style="color: #222222; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19.5px;"&gt;The following table shows the invalid XML characters and their respective replacements.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="informaltable" style="background-color: white;"&gt;
&lt;table border="1" style="border-collapse: collapse; border: 1px solid black; color: black; padding: 10px;"&gt;&lt;colgroup&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;col&gt;&lt;/col&gt;&lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span class="bold"&gt;&lt;strong&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Code&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span class="bold"&gt;&lt;strong&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Name&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span class="bold"&gt;&lt;strong&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Displayed as&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#09;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Horizontal tab&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;non-printing&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#10;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Line feed&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;non-printing&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#13;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Carriage Return&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;non-printing&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#32;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Space&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;non-printing&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#33;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Exclamation mark&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;!&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#34;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Quotation mark&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;"&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#35;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Number sign&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;#&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#36;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Dollar sign&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;$&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#37;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Percent sign&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;%&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#38;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Ampersand&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#39;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Apostrophe&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;'&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#40;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Left parenthesis&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;(&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#41;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Right parenthesis&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;)&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#42;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Asterisk&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;*&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#43;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Plus sign&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;+&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#44;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Comma&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;,&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#45;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Hyphen&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;-&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#46;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Period&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#47;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Slash&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;/&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#58;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Colon&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;:&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#59;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Semi-colon&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#60;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Less than&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;lt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#61;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Equals sign&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;=&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#62;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Greater than&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#63;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Question mark&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;?&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#64;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;At&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;@&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#91;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Left square bracket&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;[&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#92;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Bbackslash&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;\&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#93;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Right square bracket&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;]&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#94;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Caret&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;^&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#95;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Underscore&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;_&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#96;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Acute accent&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;`&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#123;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Left curly brace&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;{&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#124;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Vertical bar&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;|&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#125;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Right curly brace&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;}&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&amp;amp;#126;&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;Tilde&lt;/span&gt;&lt;/td&gt;&lt;td style="border: 1px solid black; padding: 10px;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;~&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div style="background-color: white; color: #222222; line-height: 1.5; margin-bottom: 15px; padding: 0px;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #222222; line-height: 1.5; margin-bottom: 15px; padding: 0px;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;b&gt;Reference:&lt;/b&gt;&lt;br style="margin: 0px; padding: 0px;" /&gt;1.&amp;nbsp;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.security.securityelement.escape(VS.80).aspx" style="color: #004477; margin: 0px; padding: 0px;"&gt;MSDN&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #222222; line-height: 1.5; margin-bottom: 15px; padding: 0px;"&gt;
&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="background-color: white; color: #222222; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, sans-serif; font-size: 13px; line-height: 1.5; margin-bottom: 15px; padding: 0px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>New Features in C#.Net 5.0</title><link>http://codejunction.blogspot.com/2014/02/new-features-in-cnet-50.html</link><category>.Net</category><category>.Net 4.5</category><category>C#</category><category>C# 5.0</category><category>C# Code</category><category>C# Sample code</category><category>New Feature</category><author>noreply@blogger.com (Unknown)</author><pubDate>Thu, 13 Feb 2014 14:21:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-1337263089158141414</guid><description>&lt;h4&gt;Here are some of the C#.NET 5.0 New Features -&lt;/h4&gt; &lt;p&gt;&lt;strong&gt;1. Key Features Matrix:&lt;/strong&gt; Microsoft has published a new version of C# 5.0 beta with CLR version 4.5.  &lt;p&gt;&lt;a href="http://paxcel.net/blog/wp-content/uploads/2013/03/C-net_New.png"&gt;&lt;img title="Key Features Matrix" alt="Key Features introduced in C# .Net 5.0" src="http://paxcel.net/blog/wp-content/uploads/2013/03/C-net_New-300x206.png" width="300" height="206"&gt;&lt;/a&gt;  &lt;p&gt;C# 5.0 introduces mainly two key features: Async Programming and Caller Information.  &lt;p&gt;&lt;b&gt;2. Asynchronous functions (Async and Await): &lt;/b&gt;Using Async and Await, you can use resources in the .NET Framework, to create an asynchronous method as easily as you create a synchronous method.  &lt;p&gt;Asynchronous methods are the methods that you define using async and await.  &lt;p&gt;Click on this &lt;a title="http://codejunction.blogspot.in/2014/02/new-features-added-in-c-50.html" href="http://codejunction.blogspot.in/2014/02/new-features-added-in-c-50.html"&gt;http://codejunction.blogspot.in/2014/02/new-features-added-in-c-50.html&lt;/a&gt; to know more about async and await. &lt;p&gt;&lt;b&gt;3. &lt;/b&gt;&lt;b&gt;Caller Information: &lt;/b&gt;Caller Information attributes provide the information about the caller to a method. You can obtain the file path of the source code, the line number in the source code, and the member name of the caller. Caller Information helps us in tracing, debugging, and creating diagnostic tools.  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.callerfilepathattribute%28v=vs.110%29.aspx"&gt;CallerFilePathAttribute&lt;/a&gt; - Full path of the source file that contains the caller. This is the file path used at compile time.  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.callerlinenumberattribute%28v=vs.110%29.aspx"&gt;CallerLineNumberAttribute&lt;/a&gt; - Line number in the source file on which the method is called.  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.callermembernameattribute%28v=vs.110%29.aspx"&gt;CallerMemberNameAttribute&lt;/a&gt; - Method or property name of the caller.  &lt;p&gt;&lt;b&gt;4. Windows Runtime Support: &lt;/b&gt;C# and .NET now have deep integration with the Windows Runtime. C# project can compiled into a WinMD file and then referenced from a HTML/JavaScript project. WinRT’s flavor of COM uses the same metadata format used by the Common Language Runtime. This information is stored in WINMD files that show the structure, though not the implementation, of all the public classes. Windows Runtime returns an HRESULT instead of throwing an exception. For well-known HRESULT values, the corresponding exception is thrown, otherwise a COMException is used.  &lt;p&gt;Read this article for more information on &lt;a href="http://www.infoq.com/news/2011/09/DotNet-On-WinRT;jsessionid=BE07157BCC5347704999443100EFC2A8"&gt;C# and Visual Basic on the WinRT API&lt;/a&gt;.  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;b&gt;5. Compiler APIs:&lt;/b&gt; This feature is supposed to come after C# 5.0 – the APIs will expose whatever knowledge the compiler has about the code to the IDE and the developers, through Syntax Tree APIs, Symbol APIs, Binding and Flow analysis APIs and Emit APIs.  &lt;p&gt;References:  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh156499.aspx"&gt;http://msdn.microsoft.com/en-us/library/hh156499.aspx&lt;/a&gt;  &lt;p&gt;&lt;a href="http://www.infoq.com/news/2011/09/net-v5.0"&gt;http://www.infoq.com/news/2011/09/net-v5.0&lt;/a&gt;  </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Entity Framework result set not correct</title><link>http://codejunction.blogspot.com/2014/03/entity-framework-result-set-not-correct.html</link><category>.Net</category><category>Entity Framework</category><author>noreply@blogger.com (Unknown)</author><pubDate>Wed, 12 Feb 2014 18:01:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-621270938683839061</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
This is a common problem that most of the people run into. You create an entity model to your view or table. Create a domain service and the client side code. In the client side code you put the filter and you run expecting to get some data but you end up getting one or few rows. I ran into the same problem yesterday. When I ran the program I got just the first row of the expected result. &lt;br /&gt;
The problem in my case, when I created the model from my table, I made some changes to attributes, removed bunch of columns, while doing it,&lt;em&gt; i removed the unique key that identified the rows&lt;/em&gt;. It seems that if Entity Framework can not uniquely identify the rows, it does not return all the rows. To fix it, all I had to do is, go back to the model, make the fields that uniquely identify the rows, recompile and that’s it.  &lt;br /&gt;
So if you run into any situation where the rows are not coming properly, this may be one of the culprit.&lt;br /&gt;
  &lt;br /&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Introduction to .NET Framework 4.5.1</title><link>http://codejunction.blogspot.com/2014/02/introduction-to-net-framework-451.html</link><category>.Net</category><category>.Net 4.5.1</category><category>Introduction</category><category>New Feature</category><category>Training</category><category>Tutorial</category><author>noreply@blogger.com (Unknown)</author><pubDate>Wed, 12 Feb 2014 14:43:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-3134623986669227039</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;b&gt;Introduction&lt;/b&gt;  &lt;br /&gt;
This article is a brief introduction to .NET Framework 4.5.1. This framework was released with Visual Studio 2013 Preview. There are new characteristics in this framework and those are the following:  &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Windows Store Apps  &lt;/li&gt;
&lt;li&gt;CLR Improvements  &lt;/li&gt;
&lt;li&gt;Multi-core JIT improvements  &lt;/li&gt;
&lt;li&gt;LOH Compaction  &lt;/li&gt;
&lt;li&gt;ASP.NET Scaffolding  &lt;/li&gt;
&lt;li&gt;NuGet 2.6&lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;Windows Store Apps&lt;/b&gt;  &lt;br /&gt;
Windows Store Apps are designed for specific form factors to look better in the Windows Operating System. There is a subset available for building Windows Store apps in Visual Basic and Visual C# and that subset is called .NET for Windows Store Apps.  &lt;br /&gt;
&lt;b&gt;CLR Improvements&lt;/b&gt;  &lt;br /&gt;
The following new features and improvements have been added to the Common Language Runtime (CLR) and to .NET Framework 4.5.1:  &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;When you compile any app that targets the framework 4.5.1, binding redirects may be added in the app configuration file if your application or its components reference multiple versions of the same assembly. You can enable this feature for the apps that target the older version of .NET Framework.  &lt;/li&gt;
&lt;li&gt;Better performance of the server is always needed. So now, you have the ability to collect diagnostic information to improve the performance.  &lt;/li&gt;
&lt;li&gt;Performance is also improved in the startup of the application.&amp;nbsp; &lt;/li&gt;
&lt;li&gt;Better experience of Exception Handling for Windows Store Applications.  &lt;/li&gt;
&lt;li&gt;Now you can return a value in the debugger. When you debug the application the Auto window displays the return type and value information for methods.  &lt;/li&gt;
&lt;li&gt;Managed Profile Guided Optimization Tool for optimize Windows Store Apps and Desktop apps also. &lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;Multi-core JIT improvements&lt;/b&gt;  &lt;br /&gt;
This feature was previously launched in .Net Framework 4.5. Microsoft extended this feature to work better in ASP.NET. Multi-core JIT has been extended to support dynamically loaded assemblies that exists in Assembly.LoadFrom. Multi-core JIT is enabled automatically for ASP.NET applications. The performance of ASP.NET is improved in .NET Framework 4.5.1 Preview with the Multi-core JIT improvements.  &lt;br /&gt;
&lt;b&gt;LOH Compaction&lt;/b&gt;  &lt;br /&gt;
In the .Net Framework 4.5, Large Object Heap Fragmentation is released for the better use of free blocks. LOH Fragmentation is the enhancement of Garbage Collector. With the release of .NET Framework 4.5.1 Preview, the next logical step is taken by Microsoft which is LOH Compaction. You can now instruct the Garbage Collector to compact the LOH, either as a part of natural GC or forced GC. LOH Compaction is the solution of the issue but it is expensive and should only be used after significant performance analysis. The developer can't use this in the application every 5 minutes. If an application does not have the LOH Fragmentation issue then they do not want to use the LOH Compaction. It totally depends on them.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;b&gt;ASP.NET Scaffolding&lt;/b&gt;  &lt;br /&gt;
ASP.NET Scaffolding is a code generation framework for ASP.NET Web Applications. The Visual Studio 2013 Preview has pre-installed code generators for MVC, Web Forms and Web API Projects. Using ASP.NET Scaffolding the amount of time is reduced to develop standard data operations in the Web Development Projects. There are some following prerequisites for the ASP.NET Scaffolding:  &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Visual Studio 2013 Preview  &lt;/li&gt;
&lt;li&gt;Web Developer Tools  &lt;/li&gt;
&lt;li&gt;ASP.NET Web Framework and Tools &lt;/li&gt;
&lt;/ul&gt;
&lt;b&gt;NuGet 2.6&lt;/b&gt;  &lt;br /&gt;
With the release of Visual Studio 2013 Preview, NuGet released the 2.6 version. If you do not know what NuGet is then here is some information. When you use to install the NuGet package, it copies the library files and automatically updates projects that includes references, config file and so on. Microsoft also published a list for NuGet Packages that is helpful to discover the releases of NuGet packages. NuGet 2.6 released in Visual Studio 2013 Preview provides better support for the applications that directly depends on multiple versions of a single NuGet package. This support is only available for Desktop apps, not for Windows Store Apps or Windows Phone Apps.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>New features in VB.NET 11 (.NET 4.5)</title><link>http://codejunction.blogspot.com/2014/02/new-features-in-vbnet-11-net-45.html</link><category>.Net</category><category>.Net 4.5</category><category>New Feature</category><category>vb.Net</category><category>Visual Studion 2012</category><author>noreply@blogger.com (Unknown)</author><pubDate>Mon, 10 Feb 2014 14:26:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-3113523782683091216</guid><description>&lt;p&gt;Unlike the release of VB.NET with .NET 4.0, the next release of VB.NET doesn’t have the anything like as many new features, which is almost certainly because the language is really maturing and a lot more parity has been achieved between C# and VB.NET.  &lt;p&gt;&lt;strong&gt;Async&lt;/strong&gt;  &lt;p&gt;The big new feature for both languages is the introduction of the await/async keywords. I won’t go into detail here because they are covered in lots of other places (including the &lt;a href="http://blogs.msdn.com/b/vbteam/archive/2011/04/13/async-feature-control-flow.aspx"&gt;VB.NET team blog&lt;/a&gt;).  &lt;p&gt;&lt;strong&gt;Yield&lt;/strong&gt;  &lt;p&gt;One if the freebees we get because of the Async feature is the Yield keyword. This has been a feature of C# for a long time, and although not massively useful, when you do need it, it can save you a lot of time. Let look at an example.  &lt;p&gt;Imagine you have a function that takes an array of integers and returns an IEnumerable(Of Integer) containing the even numbers in that array (I know – completely contrived demo). The easiest way to do it would be to build a list and then return it once it is complete, for example:  &lt;p&gt;&lt;code&gt;&lt;em&gt;&lt;font color="#008040"&gt;Function GetEvens(numbers As Integer()) As IEnumberable(Of Integer)&amp;nbsp; &lt;br&gt;&amp;nbsp; Dim evenNumbers As New List(Of Integer) &lt;br&gt;&amp;nbsp; For Each number in numbers &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If number Mod 2 = 0 Then &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; evenNumbers.Add(number) &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If &lt;br&gt;&amp;nbsp; Next &lt;br&gt;&amp;nbsp; Return evenNumbers &lt;br&gt;End Function&lt;/font&gt;&lt;/em&gt;&lt;/code&gt;  &lt;p&gt;With the Yield keyword we no longer need the List to hold the results, we can return them (yield them) as we find them, making our function look like this:  &lt;p&gt;&lt;code&gt;&lt;em&gt;&lt;font color="#008040"&gt;Function GetEvens(numbers As Integer()) As IEnumberable(Of Integer) &lt;br&gt;&amp;nbsp; For Each number in numbers &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If number Mod 2 = 0 Then &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yield number &lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If &lt;br&gt;&amp;nbsp; Next &lt;br&gt;End Function&lt;/font&gt;&lt;/em&gt;&lt;/code&gt;  &lt;p&gt;&lt;strong&gt;Global&lt;/strong&gt;  &lt;p&gt;The Global keyword has existed for a while to allow you to be explicit about which namespace you want. For example, assume you have this namespace in your project:  &lt;p&gt;&lt;code&gt;&lt;em&gt;&lt;font color="#008040"&gt;Namespace Acme.System.IO&lt;/font&gt;&lt;/em&gt;&lt;/code&gt;  &lt;p&gt;If you have Imported the Acme namespace this line becomes ambiguous:  &lt;p&gt;&lt;code&gt;&lt;em&gt;&lt;font color="#008040"&gt;Dim dataFile As System.IO.File&lt;/font&gt;&lt;/em&gt; &lt;/code&gt; &lt;p&gt;The global keyword allows us to be explicit:  &lt;p&gt;&lt;code&gt;&lt;em&gt;&lt;font color="#008040"&gt;Dim dataFile As Global.System.IO.File&lt;/font&gt;&lt;/em&gt; &lt;/code&gt; &lt;p&gt;In the next version of VB.NET we will also be able to use the Global keyword in namespace declarations (for exactly the same purpose). Kind of minor, but useful when you need it.    </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Five Great .NET Framework 4.5 Features</title><link>http://codejunction.blogspot.com/2014/02/five-great-net-framework-45-features.html</link><author>noreply@blogger.com (Unknown)</author><pubDate>Fri, 7 Feb 2014 14:16:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-2468061307613764944</guid><description>&lt;p&gt;Hi All,&lt;/p&gt; &lt;p&gt;You may want to check “Five Great .Nrt Framework 4.5 Features” by&amp;nbsp; &lt;b&gt;&lt;b&gt;Shivprasad Koirala&lt;/b&gt;&lt;/b&gt; on codeproject site.&lt;/p&gt; &lt;p&gt;&lt;a href="http://www.codeproject.com/Articles/599756/Five-Great-NET-Framework-4-5-Features"&gt;www.codeproject.com/Articles/599756/Five-Great-NET-Framework-4-5-Features&lt;/a&gt;&lt;/p&gt;  </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Thoughts on Unit Testing</title><link>http://codejunction.blogspot.com/2014/05/thoughts-on-unit-testing.html</link><category>Agile</category><category>NUnit</category><category>TDD</category><category>Unit Test</category><author>noreply@blogger.com (Unknown)</author><pubDate>Tue, 4 Feb 2014 17:46:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-5144625543660905790</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Yesterday I had a great conversation with one of my friend about few things one of them was Unit testing. He is a big proponent of Unit Testing. Good unit testing (see I did not write more unit testing) could&amp;nbsp; help identify and resolve the bugs in the code very early. This also helps code maintenance. I use unit testing where ever and when ever possible. I will not sit and break my head over how will I do unit test when I develop form over data patterns. On the flip side when you develop a program that involves some kind of logic that manipulate data then for sure you need to identify the components and test it.  &lt;br /&gt;
This was one of my friend example, why would we need unit testing, lets assume _a and _b are variable and instead of doing if (_a == _b) if you would do it, if (_a = _b) then you have problem. If you would write an unit test for it, you will catch it early enough. On the side note, this condition will not even compile in C#, because compiler will complain, it can not convert integer to bool implicitly. Anyway, you got the point. &lt;br /&gt;
One very import point I want to make is how many unit test you write? Write enough to do good code coverage. If you have a method which takes bunch of parameters and you are asserting against some values, in older version of NUnit, you would write individual methods for each assertion. With latest version of NUnit you can write the single test and decorate it with all the assertion saves lots of code duplication. It also make code maintenance easy. So please check out latest version of &lt;a href="http://www.nunit.org/"&gt;NUnit&lt;/a&gt;.  &lt;br /&gt;
If you are lazy or do not want to do unit test yet you need to do please your boss, here is a short cut, use &lt;a href="http://research.microsoft.com/en-us/projects/Pex/"&gt;Microsoft PEX&lt;/a&gt;. In this, you point a method and PEX will create all the possible scenario test cases with all possible input parameters.  &lt;br /&gt;
Now that I am doing more and more Silver Light + RIA, I need to do more reading on how I can test the code good. Any of you are using testing for these platform, drop me a mail.&lt;br /&gt;
  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Top 10 New Features in SQL 2012</title><link>http://codejunction.blogspot.com/2014/02/top-10-new-features-in-sql-2012.html</link><category>2012</category><category>New Feature</category><category>SQL Server</category><category>SQL Server 2012</category><author>noreply@blogger.com (Unknown)</author><pubDate>Fri, 13 Dec 2013 23:03:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-2285386089944485219</guid><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Top 10 New Features in SQL 2012&lt;/p&gt; &lt;p&gt;Our new SQL 2012 just released. I get asked all the time why should I upgrade to the latest. There are 100’s of reasons with this one, I tried to pick the best 10. More info here: &lt;a href="http://social.technet.microsoft.com/wiki/contents/articles/3783.what-s-new-in-sql-server-2012.aspx"&gt;http://social.technet.microsoft.com/wiki/contents/articles/3783.what-s-new-in-sql-server-2012.aspx&lt;/a&gt;  &lt;p&gt;1) &lt;b&gt;AlwaysOn SQL Server Failover Cluster Instances&lt;/b&gt;  &lt;ul&gt; &lt;li&gt;Multi-subnet failover clusters: A SQL Server multi-subnet failover cluster is a configuration where each failover cluster node is connected to a different subnet or different set of subnets. These subnets can be in the same location or in geographically dispersed sites. Clustering across geographically dispersed sites is sometimes referred to as Stretch clusters. As there is no shared storage that all the nodes can access, data should be replicated between the data storage on the multiple subnets. With data replication, there is more than one copy of the data available. Therefore, a multi-subnet failover cluster provides a disaster recovery solution in addition to high availability. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/ff878716.aspx"&gt;SQL Server Multi-Subnet Clustering&lt;/a&gt;.  &lt;li&gt;Flexible failover policy for cluster health detection: In a SQL Server failover cluster instance, only one node can own the cluster resource group at a given time. The client requests are served through this node for that failover cluster instance. In the case of a failure, the group ownership is moved to another node in the failover cluster. This process is called failover. The improved failure detection introduced in SQL Server 2012, and addition of failure condition level property allows you to configure a more flexible failover policy. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/ff878664.aspx"&gt;Failover Policy for Failover Cluster Instances&lt;/a&gt;.  &lt;li&gt;Indirect checkpoints: The indirect checkpoints feature provides a database-specific alternative to automatic checkpoints, which are configured by a server property. Indirect checkpoints implements a new checkpointing algorithm for the Database Engine. This algorithm provides a more accurate guarantee of database recovery time in the event of a crash or a failover than is provided by automatic checkpoints. To ensure that database recovery does not exceed allowable downtime for a given database, you can specify the maximum allowable downtime for that database. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;2) &lt;a href="file:///C:/Users/jweston.NORTHAMERICA/Documents/"&gt;&lt;b&gt;Windows PowerShell&lt;/b&gt;&lt;/a&gt;  &lt;hr align="center" size="2" width="100%" noshade&gt;  &lt;p&gt;Starting with SQL Server 2012, Windows PowerShell is no longer installed by SQL Server Setup. Windows PowerShell 2.0 is a pre-requisite for installing SQL Server 2012. If PowerShell 2.0 is not installed or enabled on your computer, you can enable it by following the instructions on the &lt;a href="http://go.microsoft.com/fwlink/?LinkId=186214"&gt;Windows Management Framework&lt;/a&gt; page. For more information about SQL Server PowerShell, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh245198.aspx"&gt;SQL Server PowerShell&lt;/a&gt;.  &lt;p&gt;SQL Server 2012 now uses the new Windows PowerShell 2.0 feature called modules for loading the SQL Server components into a PowerShell environment. Users import the &lt;b&gt;sqlps&lt;/b&gt; module into PowerShell, and the module then loads the SQL Server snap-ins. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh212996.aspx"&gt;Run Windows PowerShell from SQL Server Management Studio&lt;/a&gt;.  &lt;p&gt;The &lt;b&gt;sqlps&lt;/b&gt; Utility is no longer a PowerShell 1.0 mini-shell; it now starts PowerShell 2.0 and imports the &lt;b&gt;sqlps&lt;/b&gt; module. This improves SQL Server interoperability by making it easier for PowerShell scripts to also load the snap-ins for other products. The &lt;b&gt;sqlps&lt;/b&gt; utility is also added to the list of deprecated features starting in SQL Server 2012.  &lt;p&gt;The SQL Server PowerShell provider includes two new cmdlets: &lt;b&gt;backup-sqldatabase&lt;/b&gt; and &lt;b&gt;restore-sqldatabase&lt;/b&gt;. For more information, use the get-help cmdlet after loading in the &lt;b&gt;sqlps&lt;/b&gt; module.  &lt;p&gt;3) Data-tier Applications  &lt;ul&gt; &lt;li&gt;The data-tier application (DAC) upgrade has been changed to an in-place process that alters the existing database to match the schema defined in the new version of the DAC. This replaces the side-by-side upgrade process, which created a new database with the new schema definitions. The Upgrade a Data-Tier Application wizard has been updated to perform an in-place upgrade. The Upgrade method of the DacStore type is now deprecated, and replaced with a new IncrementalUpgrade method. Upgrades are also supported for DACs deployed to SQL Azure. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/ee634742.aspx"&gt;Upgrade a Data-tier Application&lt;/a&gt;.  &lt;li&gt;In addition to just extracting a schema definition as a new DAC package file, you can now export both the schema definition and data from a database as a DAC export file. You can then import the file to create a new database with the same schema and data. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh213241.aspx"&gt;Export a Data-tier Application&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/hh710052.aspx"&gt;Import a BACPAC File to Create a New User Database&lt;/a&gt;.  &lt;li&gt;Data-tier applications now support many more objects than in SQL Server 2008 R2. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/ee210549.aspx"&gt;DAC Support For SQL Server Objects and Versions&lt;/a&gt;.&lt;/li&gt; &lt;div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e7207994-5477-4769-9253-3221cbcb09d9" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"&gt;Technorati Tags: &lt;/div&gt;&lt;/ul&gt; &lt;p&gt;4) Server Modes for Analysis Services Instances: Multidimensional, Tabular, and SharePoint &lt;p&gt;This release adds a server mode concept to an Analysis Services installation. An instance is always installed in one of three modes that determines the memory management and storage engines used to query and process data. Server modes include Multidimensional and Data Mining, SharePoint, and Tabular. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/gg471594.aspx"&gt;Determine the Server Mode of an Analysis Services Instance&lt;/a&gt;  &lt;p&gt;5) &lt;a href="file:///C:/Users/jweston.NORTHAMERICA/Documents/"&gt;&lt;b&gt;Integration Services Performance&lt;/b&gt;&lt;/a&gt;  &lt;hr align="center" size="2" width="100%" noshade&gt;  &lt;p&gt;&lt;b&gt;Reduced Memory Usage by the Merge and Merge Join Transformations&lt;/b&gt;  &lt;p&gt;Microsoft has made the Integration Services Merge and Merge Join transformations more robust and reliable. This is achieved by reducing the risk that these components will consume excessive memory when the multiple inputs produce data at uneven rates. This improvement helps packages that use the Merge or Merge Join transformations to use memory more efficiently.  &lt;p&gt;Microsoft has also provided new properties and methods for developers of custom data flow components to implement a similar solution in their own components. This improvement makes it more feasible to develop a robust custom data flow component that supports multiple inputs. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/ff877983.aspx"&gt;Developing Data Flow Components with Multiple Inputs&lt;/a&gt;.  &lt;p&gt;6) &lt;a href="file:///C:/Users/jweston.NORTHAMERICA/Documents/"&gt;&lt;b&gt;Answering the Need with (DQS) Data Quality Services&lt;/b&gt;&lt;/a&gt;  &lt;hr align="center" size="2" width="100%" noshade&gt;  &lt;p&gt;Data quality is not defined in absolute terms. It depends upon whether data is appropriate for the purpose for which it is intended. DQS identifies potentially incorrect data, and provides you with an assessment of the likelihood that the data is in fact incorrect. DQS provides you with a semantic understanding of the data so you can decide its appropriateness. DQS enables you to resolve issues involving incompleteness, lack of conformity, inconsistency, inaccuracy, invalidity, and data duplication.  &lt;p&gt;DQS provides the following features to resolve data quality issues.  &lt;ul&gt; &lt;li&gt;&lt;b&gt;Data Cleansing:&lt;/b&gt; the modification, removal, or enrichment of data that is incorrect or incomplete, using both computer-assisted and interactive processes. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/gg524800.aspx"&gt;Data Cleansing&lt;/a&gt;.  &lt;li&gt;&lt;b&gt;Matching:&lt;/b&gt; the identification of semantic duplicates in a rules-based process that enables you to determine what constitutes a match and perform de-duplication. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh213071.aspx"&gt;Data Matching&lt;/a&gt;.  &lt;li&gt;&lt;b&gt;Reference Data Services:&lt;/b&gt; verification of the quality of your data using the services of a reference data provider. You can use reference data services from Windows Azure Marketplace DataMarket to easily cleanse, validate, match, and enrich data. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh213066.aspx"&gt;Reference Data Services in DQS&lt;/a&gt;.  &lt;li&gt;&lt;b&gt;Profiling:&lt;/b&gt; the analysis of a data source to provide insight into the quality of the data at every stage in the knowledge discovery, domain management, matching, and data cleansing processes. Profiling is a powerful tool in a DQS data quality solution. You can create a data quality solution in which profiling is just as important as knowledge management, matching, or data cleansing. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh213055.aspx"&gt;Data Profiling and Notifications in DQS&lt;/a&gt;.  &lt;li&gt;&lt;b&gt;Monitoring:&lt;/b&gt; the tracking and determination of the state of data quality activities. Monitoring enables you to verify that your data quality solution is doing what it was designed to do. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/gg524797.aspx"&gt;DQS Administration&lt;/a&gt;.  &lt;li&gt;&lt;b&gt;Knowledge Base:&lt;/b&gt; Data Quality Services is a knowledge-driven solution that analyzes data based upon knowledge that you build with DQS. This enables you to create data quality processes that continually enhances the knowledge about your data and in so doing, continually improves the quality of your data.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;7) &lt;a href="file:///C:/Users/jweston.NORTHAMERICA/Documents/"&gt;&lt;b&gt;Replication Support for AlwaysOn Availability Groups&lt;/b&gt;&lt;/a&gt;  &lt;hr align="center" size="2" width="100%" noshade&gt;  &lt;p&gt;Replication supports the following features on Availability groups:  &lt;ul&gt; &lt;li&gt;A publication database can be part of an availability group. The publisher instances must share a common distributor. Transaction, merge, and snapshot replication are supported.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;In an AlwaysOn Availability Group an AlwaysOn secondary cannot be a publisher. Republishing is not supported when replication is combined with AlwaysOn.  &lt;p&gt;Peer-To-Peer (P2P), bi-directional, reciprocal transactional publications, and Oracle Publishing are not supported.  &lt;ul&gt; &lt;li&gt;A database that is enabled for Change Data Capture (CDC) can be part of an availability group.  &lt;li&gt;A database enabled for Change Tracking (CT) can be part of an availability group. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Four new stored procedures provide replication support for AlwaysOn.  &lt;ul&gt; &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh759120.aspx"&gt;sp_redirect_publisher (Transact-SQL)&lt;/a&gt;  &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh759142.aspx"&gt;sp_get_redirected_publisher (Transact-SQL)&lt;/a&gt;  &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh759079.aspx"&gt;sp_validate_redirected_publisher (Transact-SQL)&lt;/a&gt;  &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh759080.aspx"&gt;sp_validate_replica_hosts_as_publishers (Transact-SQL)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;For more information about replication with AlwaysOn, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh710046.aspx"&gt;Configure Replication for AlwaysOn Availability Groups (SQL Server)&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/hh710048.aspx"&gt;Maintaining an AlwaysOn Publication Database (SQL Server)&lt;/a&gt;, and &lt;a href="http://msdn.microsoft.com/en-us/library/hh403414.aspx"&gt;Replication, Change Tracking, Change Data Capture, and AlwaysOn Availability Groups (SQL Server)&lt;/a&gt;.  &lt;p&gt;8) &lt;a href="file:///C:/Users/jweston.NORTHAMERICA/Documents/"&gt;&lt;b&gt;Power View&lt;/b&gt;&lt;/a&gt;  &lt;hr align="center" size="2" width="100%" noshade&gt;  &lt;p&gt;Power View, a feature of SQL Server 2012 Reporting Services Add-in for Microsoft SharePoint Server 2010 Enterprise Edition, is an interactive data exploration, visualization, and presentation experience. It provides drag-and-drop ad hoc reporting for business users such as data analysts, business decision makers, and information workers. Power View reports are in a new file format, RDLX.  &lt;p&gt;Power View expands on the self-service BI capabilities delivered with PowerPivot for Excel and PowerPivot for SharePoint by enabling customers to visualize and interact with modeled data in a meaningful way, using interactive visualizations, animations, and smart querying. It is a browser-based Silverlight application launched from within SharePoint Server 2010 that enables users to present and share insights with others in their organization through interactive presentations.  &lt;p&gt;&lt;b&gt;Based on Tabular Models&lt;/b&gt;  &lt;p&gt;With Power View, customers start from an SQL Server 2012 Analysis Services (SSAS) tabular model to build their reports. Tabular models use metadata to present an underlying data source to end users, with predefined relationships and behaviors, in terms they understand. For more information about tabular models, see &lt;a href="http://msdn.microsoft.com/en-us/library/bb522628.aspx"&gt;What's New (Analysis Services)&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/hh212945.aspx"&gt;Tabular Modeling (SSAS Tabular)&lt;/a&gt;.  &lt;p&gt;&lt;b&gt;Coexists with Report Builder&lt;/b&gt;  &lt;p&gt;Power View does not replace Report Builder, the report authoring tool for richly designed operational reports. Power View addresses the need for Web-based, ad hoc reporting. It co-exists with the latest version of Report Builder, which also ships in SQL Server 2012.  &lt;p&gt;For more information, see the following:  &lt;ul&gt; &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh213579.aspx"&gt;Power View (SSRS)&lt;/a&gt;  &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=219108"&gt;Power View and PowerPivot HelloWorldPicnic Samples for SQL Server 2012 (http://go.microsoft.com/fwlink/?LinkId=219108)&lt;/a&gt;  &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkId=221204"&gt;Tutorial: Create a Sample Report in Power View (http://go.microsoft.com/fwlink/?LinkId=221204)&lt;/a&gt;  &lt;li&gt;9) What's New (Master Data Services)&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;b&gt;Use Excel to Manage Master Data&lt;/b&gt;  &lt;p&gt;You can now manage your master data in the Master Data Services Add-in for Excel. You can use this add-in to load a filtered set of data from your Master Data Services database, work with the data in Excel, and then publish the data back to the database. If you are an administrator, you can also use the add-in to create new entities and attributes. It is easy to share shortcut query files, which contain information about the server, the model, version, entity, and any applied filters. You can send the shortcut query file to another user via Microsoft Outlook. You can refresh data in the Excel worksheet with data from the server, refreshing either the entire Excel worksheet or a contiguous selection of MDS-managed cells in the worksheet. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh231024.aspx"&gt;Master Data Services Add-in for Microsoft Excel&lt;/a&gt;.  &lt;p&gt;&lt;b&gt;Match Data before Loading&lt;/b&gt;  &lt;p&gt;Before adding more data to MDS, you can now confirm that you are not adding duplicate records. The MDS Add-in for Excel uses SQL Server Data Quality Services (DQS) to compare two sources of data: the data from MDS and the data from another system or spreadsheet. DQS provides suggestions for updating your data, along with the percent of confidence that the changes are correct. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh548681.aspx"&gt;Data Quality Matching in the MDS Add-in for Excel&lt;/a&gt;.  &lt;p&gt;&lt;b&gt;Load Data into MDS Using Entity-Based Staging&lt;/b&gt;  &lt;p&gt;Loading data into MDS has become easier. You can now load all members and attribute values for an entity at one time. Previously you had to load members and attributes in separate batches. See &lt;a href="http://msdn.microsoft.com/en-us/library/ee633726.aspx"&gt;Importing Data (Master Data Services)&lt;/a&gt;.  &lt;p&gt;10)&lt;b&gt;SQL Server Install&lt;/b&gt;  &lt;ul&gt; &lt;li&gt;Server Core Installation: Starting with SQL Server 2012, we can install SQL Server on Windows Server 2008 R2 Server Core SP1. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh231669.aspx"&gt;Install SQL Server 2012 on Server Core&lt;/a&gt;.  &lt;li&gt;SQL Server Data Tools (Formerly called Business Intelligence Development Studio): Starting with SQL Server 2012, you can install SQL Server Data Tools (SSDT) which provides an IDE for building solutions for the Business Intelligence components: Analysis Services, Reporting Services, and Integration Services. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;SSDT also includes “Database Projects”, which provides an integrated environment for database developers to carry out all their database design work for any SQL Server platform (both on and off premise) within Visual Studio. Database developers can use the enhanced Server Object Explorer in Visual Studio to easily create or edit database objects and data, or execute queries.  &lt;ul&gt; &lt;li&gt;SQL Server multi-subnet clustering: You can now configure a SQL Server failover cluster using clustered nodes on different subnets. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/ff878716.aspx"&gt;SQL Server Multi-Subnet Clustering&lt;/a&gt;.  &lt;li&gt;SMB file share is a supported storage option: System databases (Master, Model, MSDB, and TempDB), and Database Engine user databases can be installed on a file share on an SMB file server. This applies to both SQL Server stand-alone and SQL Server failover cluster installations. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh759341.aspx"&gt;Install SQL Server with SMB fileshare as a storage option&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;  </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>New features added in C# 5.0</title><link>http://codejunction.blogspot.com/2014/02/new-features-added-in-c-50.html</link><category>.Net 4.5</category><category>C#</category><category>C# 5.0</category><category>C# Code</category><category>C# Sample code</category><category>New Feature</category><author>noreply@blogger.com (Unknown)</author><pubDate>Thu, 31 Oct 2013 13:54:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-1770939002230534895</guid><description>&lt;p&gt;&lt;strong&gt;&lt;font color="#008040" size="6"&gt;C#&lt;/font&gt;&lt;/strong&gt; most recent version 5.0 was released on August 15, 2012 with .NET Framework 4.5 and Visual Studio 2012. &lt;/p&gt; &lt;p&gt;There are two main features in C# 5.0 - Async Programming and Caller Information. Let's understand both these features in details as given below.&lt;/p&gt; &lt;h4&gt;Async Feature (Asynchronous Methods)&lt;/h4&gt; &lt;p&gt;C# 5.0 Async feature introduces two keywords async and await which allows you to write asynchronous code more easily and intuitively like as synchronous code. Before C# 5.0, for writing an asynchronous code, you need to define callbacks (also known as continuations) to capture what happens after an asynchronous process finishes. This makes your code and other routine task such exception handling complicated. &lt;p&gt;Both the keywords are used in a combination of each other. Hence, an await operator is applied to a one or more than one expressions of an async method. An async method returns a Task or Task&amp;lt;TResult&amp;gt; that represents the ongoing work of the method. The task contains information that the caller of the asynchronous method can use, such as the status of the task, its unique ID, and the method's result.&lt;pre&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt;public async Task&amp;lt;IEnumerable&amp;lt;Product&amp;gt;&amp;gt; GetProductList()&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt;{&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt; HttpClient client = new HttpClient();&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt; Uri address = new Uri("http://dotnet-tricks.com/");&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt; client.BaseAddress = address;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;&amp;nbsp;&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt; HttpResponseMessage response = await client.GetAsync("myservice/product/ProductList");&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;&amp;nbsp;&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt; if (response.IsSuccessStatusCode)&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt; {&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt; var list = await response.Content.ReadAsAsync&amp;lt;IEnumerable&amp;lt;Product&amp;gt;&amp;gt;();&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt; return list;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt; }&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt; else&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt; {&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt; return null;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt; }&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;li&gt;&lt;p&gt;&lt;em&gt;&lt;font color="#008040"&gt;}&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h4&gt;Caller Information (Caller info attributes)&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Caller Information can help you in tracing, debugging and creating diagnose tools. It will help you to avoid duplicate codes which are generally invoked in many methods for same purpose, such as logging and tracing.&lt;br /&gt;&lt;p&gt;You could get the following information of caller method:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;h4&gt;CallerFilePathAttribute&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Full path of the source file that contains the caller. This is the file path at compile time.&lt;/p&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;h4&gt;CallerLineNumberAttribute&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Line number in the source file at which the method is called.&lt;/p&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;h4&gt;CallerMemberNameAttribute&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;Method or property name of the caller.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;pre&gt;&lt;ol&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;using System;&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;using System.Collections.Generic;&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;using System.Linq;&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;using System.Text;&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;using System.Threading.Tasks;&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;&amp;nbsp;&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;class Example&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;{&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; static void Main(string[] args)&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; {&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; Console.WriteLine("Main method Start");&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; InsertLog("Main");&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; MyMethodB();&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; MyMethodA();&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; Console.WriteLine("Main method End!");&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; Console.ReadLine(); // hold on result&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; }&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;&amp;nbsp;&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; static void MyMethodA()&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; {&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; InsertLog("MyMethodA");&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; MyMethodB();&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; }&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;&amp;nbsp;&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; static void MyMethodB()&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; {&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; // some code here. &lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; }&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;&amp;nbsp;&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; static void InsertLog(string method)&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; {&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; Console.WriteLine("{0} called MyMethodB at {1}", method,&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; DateTime.Now);&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; }&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;}&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;/* Output:&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; Main method Start&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; Main called MyMethodB at 11/17/2013 11:12:24 PM&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; MyMethodA called MyMethodB at 11/17/2013 11:12:24 PM&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt; Main method End!&lt;/font&gt;&lt;/em&gt;&lt;li&gt;&lt;em&gt;&lt;font color="#008040"&gt;*/&lt;/font&gt;&lt;/em&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;In both Main and MyMethodA, method InsertLog is invoked for logging. Now we can change the above code as follows.&lt;pre&gt;&lt;ol&gt;&lt;li&gt;&lt;font color="#008040"&gt;using System;&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt;using System.Collections.Generic;&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt;using System.Runtime.CompilerServices;&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt;using System.Text;&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt;using System.Threading.Tasks;&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt;&amp;nbsp;&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt;class Example&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt;{&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; static void Main(string[] args)&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; {&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; Console.WriteLine("Main method Start");&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; MyMethodB();&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; MyMethodA();&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; Console.WriteLine("Main method End!");&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; Console.ReadLine();&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; }&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt;&amp;nbsp;&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; static void MyMethodA()&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; {&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; MyMethodB();&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; }&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt;&amp;nbsp;&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; static void MyMethodB([CallerMemberName] string memberName = "", [CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0)&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; {&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; InsertLog(memberName);&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; }&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt;&amp;nbsp;&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; static void InsertLog(string method)&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; {&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; Console.WriteLine("{0} called MyMethodB at {1}", method, DateTime.Now);&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; }&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt;}&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt;&amp;nbsp;&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt;/*Output:&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; Main method Start&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; Main called MyMethodB at 11/17/2013 10:30:11 PM&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; MyMethodA called MyMethodB at 11/17/2013 10:30:11 PM&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; Main method End!&lt;/font&gt;&lt;li&gt;&lt;font color="#008040"&gt; */&lt;/font&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/pre&gt;&lt;br /&gt;&lt;h6&gt;&lt;/h6&gt;&lt;br /&gt;&lt;p&gt;Hope you like these new features of C# 5.0.&lt;/p&gt;  </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>How to change the root password for MySQL in XAMPP?</title><link>http://codejunction.blogspot.com/2013/08/how-to-change-root-password-for-mysql.html</link><category>MYSQL</category><category>Password</category><category>php</category><category>reset</category><category>root</category><author>noreply@blogger.com (Unknown)</author><pubDate>Sat, 24 Aug 2013 13:43:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-2423648261209101717</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
By default, when you install XAMPP in your windows machine, the 
&lt;code&gt;root&lt;/code&gt; password for the MySQL is set to empty. But this is not 
recommended, as the MySQL database without a password will be accessible to 
everyone. To avoid this, a proper/secure password must be set to the user 
&lt;code&gt;root&lt;/code&gt;. To do it in XAMPP, there are two ways.&lt;br /&gt;
&lt;h2&gt;
Method 1: reset XAMPP MySQL root password through web interface:&lt;/h2&gt;
After you started your XAMPP server, go to the browser and type the URL 
&lt;strong&gt;http://localhost/security/&lt;/strong&gt; (incase you've &lt;a href="http://veerasundar.com/blog/2009/07/how-to-change-xampp-server-port/" title="How to change XAMPP server port?"&gt;modified 
XAMPP server port&lt;/a&gt;, you need to include that port number also in previous 
URL). The security page will be shown where you can change the &lt;code&gt;root&lt;/code&gt; 
password for MySQL. This will update the phpMyAdmin config also. &lt;br /&gt;
&lt;h2&gt;
Method 2: reset XAMPP MySQL root password through SQL update:&lt;/h2&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Start the Apache Server and MySQL instances from the XAMPP control panel. 
&lt;/li&gt;
&lt;li&gt;After the server started, open any web browser and give 
&lt;strong&gt;http://localhost:8090/phpmyadmin/&lt;/strong&gt; (if you are running XAMPP on 
8090 port). This will open the phpMyAdmin interface. Using this interface we can 
manager the MySQL server from the web browser. 
&lt;/li&gt;
&lt;li&gt;In the phpMyAdmin window, select &lt;em&gt;SQL&lt;/em&gt; tab from the right panel. This 
will open the SQL tab where we can run the SQL queries. 
&lt;/li&gt;
&lt;li&gt;Now type the following query in the textarea and click 
&lt;strong&gt;Go&lt;/strong&gt;&lt;br /&gt;&lt;code&gt;UPDATE mysql.user SET Password=PASSWORD('password') 
WHERE User='root'; FLUSH PRIVILEGES;&lt;/code&gt; 
&lt;/li&gt;
&lt;li&gt;Now you will see a message saying that the query has been executed 
successfully. 
&lt;/li&gt;
&lt;li&gt;If you refresh the page, you will be getting a error message. This is 
because the phpMyAdmin configuration file is not aware of our newly set root 
passoword. To do this we have to modify the phpMyAdmin config file. 
&lt;/li&gt;
&lt;li&gt;Open the file &lt;strong&gt;[XAMPP Installation Path] / phpmyadmin / 
config.inc.php&lt;/strong&gt; in your favorite text editor. 
&lt;/li&gt;
&lt;li&gt;Search for the string &lt;code&gt;$cfg\['Servers'\]\[$i\]['password'] = '';&lt;/code&gt; 
and change it to like this, &lt;code&gt;$cfg\['Servers'\]\[$i\]['password'] = 
'password';&lt;/code&gt; Here the 'password' is what we set to the &lt;code&gt;root&lt;/code&gt; 
user using the SQL query. 
&lt;/li&gt;
&lt;li&gt;Now all set to go. Save the config.inc.php file and restart the XAMPP 
server.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>.Net c# parallel yield</title><link>http://codejunction.blogspot.com/2013/07/net-c-parallel-yield.html</link><category>.Net</category><category>.Net 4.0</category><category>C#</category><category>C# Code</category><category>C# Sample code</category><author>noreply@blogger.com (Unknown)</author><pubDate>Thu, 18 Jul 2013 14:00:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-2957243262828490784</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;i&gt;&lt;b&gt;yield &lt;/b&gt;&lt;/i&gt;is a very useful keyword in C# that allows you to create 
dynamic enumerators of stuffs without having to fill in a List&amp;lt;T&amp;gt; 
of things you want to return first. The generated code builds a state 
machine that will go forward, step by step, whenever the caller calls 
MoveNext on the IEnumerable it gets back (usually using foreach).&lt;br /&gt;

&lt;div&gt;
&lt;div class="syntaxhighlighter  cpp" id="highlighter_386403"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;br /&gt;&lt;div class="line number22 index21 alt1"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp keyword bold"&gt;static&lt;/code&gt; &lt;code class="cpp keyword bold"&gt;void&lt;/code&gt; &lt;code class="cpp plain"&gt;Main(string[] args)&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;var input = &lt;/code&gt;&lt;code class="cpp keyword bold"&gt;new&lt;/code&gt;&lt;code class="cpp plain"&gt;[] { &lt;/code&gt;&lt;code class="cpp string"&gt;"A"&lt;/code&gt;&lt;code class="cpp plain"&gt;, &lt;/code&gt;&lt;code class="cpp string"&gt;"B"&lt;/code&gt;&lt;code class="cpp plain"&gt;, &lt;/code&gt;&lt;code class="cpp string"&gt;"C"&lt;/code&gt; &lt;code class="cpp plain"&gt;};&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Console.WriteLine(String.Join(&lt;/code&gt;&lt;code class="cpp string"&gt;"\n"&lt;/code&gt;&lt;code class="cpp plain"&gt;, Process(input)));&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp keyword bold"&gt;static&lt;/code&gt; &lt;code class="cpp plain"&gt;IEnumerable&amp;lt;string&amp;gt; Process(IEnumerable&amp;lt;string&amp;gt; input)&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;if&lt;/code&gt; &lt;code class="cpp plain"&gt;(input == null)&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;throw&lt;/code&gt; &lt;code class="cpp keyword bold"&gt;new&lt;/code&gt; &lt;code class="cpp plain"&gt;ArgumentNullException(&lt;/code&gt;&lt;code class="cpp string"&gt;"input"&lt;/code&gt;&lt;code class="cpp plain"&gt;);&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;foreach (var item in input)&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number15 index14 alt2"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;yield &lt;/code&gt;&lt;code class="cpp keyword bold"&gt;return&lt;/code&gt; &lt;code class="cpp string"&gt;"Process "&lt;/code&gt; &lt;code class="cpp plain"&gt;+ item;&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number16 index15 alt1"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number17 index16 alt2"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number18 index17 alt1"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number19 index18 alt2"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp comments"&gt;// Output :&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number20 index19 alt1"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp comments"&gt;// Process A&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number21 index20 alt2"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp comments"&gt;// Process B&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number22 index21 alt1"&gt;
&lt;span style="color: #0b5394;"&gt;&lt;i&gt;&lt;code class="cpp comments"&gt;// Process C&lt;/code&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class="line number22 index21 alt1"&gt;
&lt;code class="cpp comments"&gt;&amp;nbsp;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
The second really useful thing is Parallel.ForEach. Whenever you have
 to process loads of independent data that are CPU hungry you can launch
 the process in parallel and have it scheduled for you by the .NET 
runtime.&lt;br /&gt;

&lt;div&gt;
&lt;div class="syntaxhighlighter  cpp" id="highlighter_768709"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number26 index25 alt1"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp keyword bold"&gt;static&lt;/code&gt; &lt;code class="cpp keyword bold"&gt;void&lt;/code&gt; &lt;code class="cpp plain"&gt;Main(string[] args)&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;var input = &lt;/code&gt;&lt;code class="cpp keyword bold"&gt;new&lt;/code&gt;&lt;code class="cpp plain"&gt;[] { &lt;/code&gt;&lt;code class="cpp string"&gt;"A"&lt;/code&gt;&lt;code class="cpp plain"&gt;, &lt;/code&gt;&lt;code class="cpp string"&gt;"B"&lt;/code&gt;&lt;code class="cpp plain"&gt;, &lt;/code&gt;&lt;code class="cpp string"&gt;"C"&lt;/code&gt; &lt;code class="cpp plain"&gt;};&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Stopwatch w = &lt;/code&gt;&lt;code class="cpp keyword bold"&gt;new&lt;/code&gt; &lt;code class="cpp plain"&gt;Stopwatch();&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;w.Start();&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Process(input);&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;w.Stop();&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Console.WriteLine(&lt;/code&gt;&lt;code class="cpp string"&gt;"{0}s "&lt;/code&gt;&lt;code class="cpp plain"&gt;, w.Elapsed.TotalSeconds);&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp keyword bold"&gt;static&lt;/code&gt; &lt;code class="cpp keyword bold"&gt;void&lt;/code&gt; &lt;code class="cpp plain"&gt;Process(IEnumerable&amp;lt;string&amp;gt; input)&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number15 index14 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;if&lt;/code&gt; &lt;code class="cpp plain"&gt;(input == null)&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number16 index15 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;throw&lt;/code&gt; &lt;code class="cpp keyword bold"&gt;new&lt;/code&gt; &lt;code class="cpp plain"&gt;ArgumentNullException(&lt;/code&gt;&lt;code class="cpp string"&gt;"input"&lt;/code&gt;&lt;code class="cpp plain"&gt;);&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number17 index16 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number18 index17 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Parallel.ForEach(input, item =&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number19 index18 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number20 index19 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp comments"&gt;// Something long&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number21 index20 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Thread.Sleep(1000);&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number22 index21 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;});&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number23 index22 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number24 index23 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number25 index24 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp comments"&gt;// Output :&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number26 index25 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp comments"&gt;// ~ 1s although we had 3 stuffs that each took 1s&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number26 index25 alt1"&gt;
&lt;code class="cpp comments"&gt;&amp;nbsp;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
What if we could write that?&lt;br /&gt;

&lt;div&gt;
&lt;div class="syntaxhighlighter  cpp" id="highlighter_46659"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number27 index26 alt2"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;code class="cpp keyword bold"&gt;&amp;nbsp;&lt;/code&gt;&lt;/div&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp keyword bold"&gt;static&lt;/code&gt; &lt;code class="cpp keyword bold"&gt;void&lt;/code&gt; &lt;code class="cpp plain"&gt;Main(string[] args)&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;var input = &lt;/code&gt;&lt;code class="cpp keyword bold"&gt;new&lt;/code&gt;&lt;code class="cpp plain"&gt;[] { &lt;/code&gt;&lt;code class="cpp string"&gt;"A"&lt;/code&gt;&lt;code class="cpp plain"&gt;, &lt;/code&gt;&lt;code class="cpp string"&gt;"B"&lt;/code&gt;&lt;code class="cpp plain"&gt;, &lt;/code&gt;&lt;code class="cpp string"&gt;"C"&lt;/code&gt; &lt;code class="cpp plain"&gt;};&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Stopwatch w = &lt;/code&gt;&lt;code class="cpp keyword bold"&gt;new&lt;/code&gt; &lt;code class="cpp plain"&gt;Stopwatch();&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;w.Start();&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;var result = Process(input);&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;w.Stop();&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Console.WriteLine(&lt;/code&gt;&lt;code class="cpp string"&gt;"{0}s "&lt;/code&gt;&lt;code class="cpp plain"&gt;, w.Elapsed.TotalSeconds);&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Console.WriteLine(String.Join(&lt;/code&gt;&lt;code class="cpp string"&gt;"\n"&lt;/code&gt;&lt;code class="cpp plain"&gt;, result));&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp keyword bold"&gt;static&lt;/code&gt; &lt;code class="cpp plain"&gt;IEnumerable&amp;lt;string&amp;gt; Process(IEnumerable&amp;lt;string&amp;gt; input)&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number15 index14 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number16 index15 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;if&lt;/code&gt; &lt;code class="cpp plain"&gt;(input == null)&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number17 index16 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;throw&lt;/code&gt; &lt;code class="cpp keyword bold"&gt;new&lt;/code&gt; &lt;code class="cpp plain"&gt;ArgumentNullException(&lt;/code&gt;&lt;code class="cpp string"&gt;"input"&lt;/code&gt;&lt;code class="cpp plain"&gt;);&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number18 index17 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number19 index18 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Parallel.ForEach(input, item =&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number20 index19 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number21 index20 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp comments"&gt;// Something long&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number22 index21 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Thread.Sleep(1000);&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number23 index22 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number24 index23 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp comments"&gt;// &amp;gt;&amp;gt;&amp;gt;&amp;gt; THE POWER !!&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number25 index24 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;yield &lt;/code&gt;&lt;code class="cpp keyword bold"&gt;return&lt;/code&gt; &lt;code class="cpp string"&gt;"Process "&lt;/code&gt; &lt;code class="cpp plain"&gt;+ item;&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number26 index25 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;});&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number27 index26 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number27 index26 alt2"&gt;
&lt;code class="cpp plain"&gt;&amp;nbsp;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
But no we can’t because “&lt;strong&gt;The yield statement cannot be used inside an anonymous method or lambda expression&lt;/strong&gt;“.&lt;br /&gt;
You obviously can’t mix those two pieces of magic together. In fact, if 
we could this would produce some of the weirdest bugs ever if something 
went wrong. But maybe we can’t build something that looks like it, for 
the sake of doing it?&lt;br /&gt;

&lt;div&gt;
&lt;div class="syntaxhighlighter  cpp " id="highlighter_171357"&gt;
&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;
&lt;div class="line number1 index0 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp keyword bold"&gt;static&lt;/code&gt; &lt;code class="cpp keyword bold"&gt;void&lt;/code&gt; &lt;code class="cpp plain"&gt;Main(string[] args)&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number2 index1 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number3 index2 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;var input = &lt;/code&gt;&lt;code class="cpp keyword bold"&gt;new&lt;/code&gt;&lt;code class="cpp plain"&gt;[] { &lt;/code&gt;&lt;code class="cpp string"&gt;"A"&lt;/code&gt;&lt;code class="cpp plain"&gt;, &lt;/code&gt;&lt;code class="cpp string"&gt;"B"&lt;/code&gt;&lt;code class="cpp plain"&gt;, &lt;/code&gt;&lt;code class="cpp string"&gt;"C"&lt;/code&gt; &lt;code class="cpp plain"&gt;};&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number4 index3 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number5 index4 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Stopwatch w = &lt;/code&gt;&lt;code class="cpp keyword bold"&gt;new&lt;/code&gt; &lt;code class="cpp plain"&gt;Stopwatch();&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number6 index5 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;w.Start();&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number7 index6 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;var result = Process(input);&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number8 index7 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number9 index8 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Trace.WriteLine(String.Format(&lt;/code&gt;&lt;code class="cpp string"&gt;"{0}s before enumerating"&lt;/code&gt;&lt;code class="cpp plain"&gt;, w.Elapsed.TotalSeconds));&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number10 index9 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Trace.WriteLine(String.Format(String.Join(&lt;/code&gt;&lt;code class="cpp string"&gt;"\n"&lt;/code&gt;&lt;code class="cpp plain"&gt;, result)));&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number11 index10 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Trace.WriteLine(String.Format(&lt;/code&gt;&lt;code class="cpp string"&gt;"{0}s after enumerating"&lt;/code&gt;&lt;code class="cpp plain"&gt;, w.Elapsed.TotalSeconds));&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number12 index11 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number13 index12 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number14 index13 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp keyword bold"&gt;static&lt;/code&gt; &lt;code class="cpp plain"&gt;IEnumerable&amp;lt;string&amp;gt; Process(IEnumerable&amp;lt;string&amp;gt; input)&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number15 index14 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number16 index15 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;if&lt;/code&gt; &lt;code class="cpp plain"&gt;(input == null)&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number17 index16 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;throw&lt;/code&gt; &lt;code class="cpp keyword bold"&gt;new&lt;/code&gt; &lt;code class="cpp plain"&gt;ArgumentNullException(&lt;/code&gt;&lt;code class="cpp string"&gt;"input"&lt;/code&gt;&lt;code class="cpp plain"&gt;);&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number18 index17 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number19 index18 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;var workQueue = &lt;/code&gt;&lt;code class="cpp keyword bold"&gt;new&lt;/code&gt; &lt;code class="cpp plain"&gt;ConcurrentQueue&amp;lt;string&amp;gt;();&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number20 index19 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Exception workException = null;&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number21 index20 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;var completed = &lt;/code&gt;&lt;code class="cpp keyword bold"&gt;false&lt;/code&gt;&lt;code class="cpp plain"&gt;;&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number22 index21 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number23 index22 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp comments"&gt;// This task will run on its side in another thread&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number24 index23 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Task.Run(() =&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number25 index24 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number26 index25 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;try&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number27 index26 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number28 index27 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Parallel.ForEach(input, item =&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number29 index28 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number30 index29 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp comments"&gt;// Something long&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number31 index30 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Thread.Sleep(1000);&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number32 index31 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number33 index32 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp comments"&gt;// Push our results here&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number34 index33 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;workQueue.Enqueue(&lt;/code&gt;&lt;code class="cpp string"&gt;"Process "&lt;/code&gt; &lt;code class="cpp plain"&gt;+ item);&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number35 index34 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;});&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number36 index35 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number37 index36 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;catch&lt;/code&gt; &lt;code class="cpp plain"&gt;(Exception ex)&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number38 index37 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number39 index38 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp comments"&gt;// We don't want a crash to be lost in another thread&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number40 index39 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp comments"&gt;// so we have to bring it back somehow on the main thread&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number41 index40 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;workException = ex;&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number42 index41 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number43 index42 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number44 index43 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;completed = &lt;/code&gt;&lt;code class="cpp keyword bold"&gt;true&lt;/code&gt;&lt;code class="cpp plain"&gt;;&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number45 index44 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;});&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number46 index45 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number47 index46 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp comments"&gt;// Not the most elegant, but it's just for fun so ...&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number48 index47 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;while&lt;/code&gt; &lt;code class="cpp plain"&gt;(!completed)&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number49 index48 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number50 index49 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;string item;&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number51 index50 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;if&lt;/code&gt; &lt;code class="cpp plain"&gt;(workQueue.TryDequeue(out item))&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number52 index51 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;yield &lt;/code&gt;&lt;code class="cpp keyword bold"&gt;return&lt;/code&gt; &lt;code class="cpp plain"&gt;item;&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number53 index52 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;else&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number54 index53 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;Thread.Sleep(1); &lt;/code&gt;&lt;code class="cpp comments"&gt;// remember, just for fun&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number55 index54 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number56 index55 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number57 index56 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp comments"&gt;// We don't want to lose the last items&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number58 index57 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;string finalItem;&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number59 index58 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;while&lt;/code&gt; &lt;code class="cpp plain"&gt;(workQueue.TryDequeue(out finalItem))&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number60 index59 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;yield &lt;/code&gt;&lt;code class="cpp keyword bold"&gt;return&lt;/code&gt; &lt;code class="cpp plain"&gt;finalItem;&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number61 index60 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number62 index61 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp comments"&gt;// Buble the exception if there's one&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number63 index62 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;if&lt;/code&gt; &lt;code class="cpp plain"&gt;(workException != null)&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number64 index63 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;{&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number65 index64 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp keyword bold"&gt;throw&lt;/code&gt; &lt;code class="cpp keyword bold"&gt;new&lt;/code&gt; &lt;code class="cpp plain"&gt;Exception(&lt;/code&gt;&lt;code class="cpp string"&gt;"Error while doing stuffs"&lt;/code&gt;&lt;code class="cpp plain"&gt;, workException);&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number66 index65 alt1"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp spaces"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/code&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div class="line number67 index66 alt2"&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;&lt;code class="cpp plain"&gt;}&lt;/code&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;
&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style="color: #0b5394;"&gt;Output:&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;
&lt;/span&gt;&lt;/i&gt;&lt;blockquote&gt;
&lt;i&gt;&lt;span style="color: #0b5394;"&gt;
0.00039s before enumerating&lt;br /&gt;
Process B&lt;br /&gt;
Process A&lt;br /&gt;
Process C&lt;br /&gt;
1.0398348s after enumerating
&lt;/span&gt;&lt;/i&gt;&lt;/blockquote&gt;
Notice than we did have an “yield behavior” as the processing was not
 executed on the call to Process, and how the whole process took 1s 
where it has 3 items that each took 1s. We also don’t have a reliable 
order anymore, it could have been any combination of B, A and C.&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><georss:featurename xmlns:georss="http://www.georss.org/georss">United States</georss:featurename><georss:point xmlns:georss="http://www.georss.org/georss">21.289374355860424 -101.953125</georss:point><georss:box xmlns:georss="http://www.georss.org/georss">-4.2326601441395759 -143.261719 46.811408855860421 -60.644531</georss:box></item><item><title>SQL Server 2014 New Features</title><link>http://codejunction.blogspot.com/2013/06/sql-server-2014-new-features.html</link><category>Download</category><category>New Feature</category><category>SQL Server</category><category>SQL Server 2014</category><author>noreply@blogger.com (Unknown)</author><pubDate>Mon, 10 Jun 2013 18:29:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-1364304738785553089</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
                               Although it doesn’t seem possible so 
soon, Microsoft announced SQL Server 2014 at this year’s TechEd 2013 
conference in New Orleans. Quentin Clark, Microsoft Corporate Vice 
President for SQL Server, said that Microsoft is getting ready for the 
upcoming SQL Server 2014 release. Some of the most important new 
features in SQL Server 2014 include the following:&lt;br /&gt;
&lt;br /&gt;
                                                             &lt;strong&gt;In-Memory OLTP Engine&lt;/strong&gt;&lt;br /&gt;
                               The new In-Memory OLTP Engine (formerly 
code-named Hekaton) will provide OLTP performance improvements by moving
 selected tables into memory. The In-memory OTLP Engine works with 
commodity hardware and won’t require any application code changes. A 
built-in wizard will help you to choose which tables go in memory and 
select the stored procedures that will be compiled into machine code for
 high performance execution.&lt;br /&gt;
                                     
                        EdgeNet, an early adopter, saw a 7X performance 
increase with no code changes. Microsoft claims that some applications 
can achieve a 50x performance boost using the new In-Memory OTLP engine.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Backup Encryption&lt;/strong&gt;&lt;br /&gt;
                              Encrypting
 backups gets simpler in SQL Server 2014.&amp;nbsp; Check out a great 
illustration of the how you can prevent anyone from taking your backup 
file and restoring it to another database server with the new SQL Server
 2014 encryption capabilities by reading &lt;a href="http://joedantoni.wordpress.com/2014/01/09/my-favorite-new-feature-in-sql-server-2014/" target="_blank"&gt;My Favorite New Feature in SQL Server 2014&lt;/a&gt; by Joey D'Antoni.&lt;br /&gt;
&lt;br /&gt;
                              &lt;strong&gt;Business Intelligence&lt;/strong&gt;&lt;br /&gt;
                              SQL
 Server 2014 includes business intelligence (BI) improvements to help 
build and support vast databases and data warehouses. Learn more about 
what SQL Server 2014 will do for your business Intelligence efforts in &lt;a href="http://www.dbta.com/Columns/SQL-Server-Drill-Down/Upcoming-Business-Intelligence-Enhancements-in-SQL-Server-2014-93600.aspx" target="_blank"&gt;Upcoming Business Intelligence Enhancements in SQL Server 2014&lt;/a&gt; by Kevin Kline.&lt;br /&gt;
&lt;br /&gt;
                              &lt;strong&gt;In-Memory OLTP Engine&lt;/strong&gt;&lt;br /&gt;
                              In-Memory
 OLTP significantly improves the OLTP workload and reduces the time 
required for processing. The performance gains depend on the hardware 
infrastructure you have and how you are writing your queries. Get more 
details from Arshad Ali in &lt;a href="http://www.mssqltips.com/sqlservertip/3106/sql-server-2014-inmemory-oltp-architecture-and-data-storage/" target="_blank"&gt;SQL Server 2014 In-Memory OLTP Architecture and Data Storage&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
                              &lt;strong&gt;Memory Optimization Advisor&lt;/strong&gt;&lt;br /&gt;
                              The
 SQL Server 2014 Memory Optimization Advisor will help you quickly 
analyze your tables and walks you through reviewing and migrating 
disk-based table to In-Memory OLTP tables. Greg Larsen give you a 
walk-through of how to use the Memory Optimization Advisor tool to 
migrate a table in the AdventureWorks2012 database. See, &lt;a href="http://www.databasejournal.com/features/mssql/sql-server-2014-memory-optimization-advisor.html" target="_blank"&gt;SQL Server 2014 Memory Optimization Advisor&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
                              &lt;strong&gt;Windows Azure Integration&lt;/strong&gt;&lt;br /&gt;
                              SQL
 Server 2014 includes the ability to use Windows Azure for offsite 
backup storage and as a disaster recovery site. With SQL Server 2014 you
 can backup and restore your databases from copies stored in Windows 
Azure, which can quickly and easily provide off-site storage for all 
backups. More specifics are available in &lt;a href="http://www.enpointe.com/blog/SQL-Server2014-CTP2-and-Azure-Backups" target="_blank"&gt;SQL Server 2014 CTP2 and Azure Backups&lt;/a&gt; by Joseph Karnes.&lt;br /&gt;
&lt;/div&gt;
</description><georss:featurename xmlns:georss="http://www.georss.org/georss">United States</georss:featurename><georss:point xmlns:georss="http://www.georss.org/georss">37.09024 -95.712891000000013</georss:point><georss:box xmlns:georss="http://www.georss.org/georss">23.559521500000002 -116.36718800000001 50.6209585 -75.058594000000014</georss:box></item><item><title>The "FindRibbons" task could not be loaded MS Office VSTO</title><link>http://codejunction.blogspot.com/2012/12/the-findribbons-task-could-not-be.html</link><category>FindRibbons</category><category>MS Office</category><category>VSTO</category><author>noreply@blogger.com (Unknown)</author><pubDate>Wed, 19 Dec 2012 17:49:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-1583554242630869474</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;span style="background-color: white; color: #333333; font-family: 'Helvetica Neue Light', HelveticaNeue-Light, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.4; text-align: justify;"&gt;I've recently encountered with an error in a VSTO development (an Excel Add-in) under Vs 2010 environment.&amp;nbsp;&amp;nbsp; The error message I got when compiling the solution is as follows.&lt;/span&gt;&lt;br /&gt;&lt;div class="article-content entry-content" itemprop="articleBody" style="background-color: white; clear: both; color: #333333; font-family: 'Helvetica Neue Light', HelveticaNeue-Light, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.4; margin: 10px auto 5px; outline: none; padding: 0px; text-align: justify;"&gt;
&lt;br /&gt;"The "FindRibbons" task could not be loaded from the assembly Microsoft.VisualStudio.Tools.Office.BuildTasks, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Confirm that the &amp;lt;UsingTask&amp;gt; declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask"&lt;br /&gt;&lt;br /&gt;I have install the VS 2012 together with VS2010 recently and I did the following process to get this resolved.&lt;br /&gt;&lt;br /&gt;1. Open "Microsoft.VisualStudio.Tools.Office.targets" File from below Location&lt;br /&gt;C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\OfficeTools&lt;br /&gt;2.&amp;nbsp; Press Ctrl+H and replace all all 10.0.0.0 text wit 11.0.0.0&lt;br /&gt;3. Save the file to desktop with the same same &amp;amp; extension.&lt;br /&gt;4. Delete the original file&lt;br /&gt;5. Cut and pate the saved file to above location.&lt;br /&gt;6. Close and restart VS 2010 (If Opened)&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total></item><item><title>How to Easily integrate PHP Code in Blogger or blogspot</title><link>http://codejunction.blogspot.com/2012/12/how-to-easily-integrate-php-code-in.html</link><category>blogger</category><category>blogspot</category><category>Drop Box</category><category>Google drive</category><category>Hosting</category><category>php</category><category>SkyDrive</category><author>noreply@blogger.com (Unknown)</author><pubDate>Wed, 12 Dec 2012 15:58:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-6636030023416846988</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
PHP is considered as the most powerful computer language that makes 
things happen with the glimpse of seconds. However, PHP is not supported
 by Blogger or BlogSpot running platform which makes it extremely 
difficult to customize and implement some new latest developments, but 
there are still some ways through which you can add PHP codes in your 
Blogger enabled Website. Though, the results are not 100%, but it is far
 better than not having a PHP code on your blogger site. In this 
article, we will show you how to add PHP codes in Blogger.&lt;br /&gt;
&lt;a href="https://www.blogger.com/null" name="more"&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;h4 style="text-align: left;"&gt;
Step#1: Creating a PHP File:&lt;/h4&gt;
Before you can add PHP Codes in blogger, you have to first create a PHP 
file in which you have to use all the PHP codes that you would like to 
use. &amp;nbsp;However, make sure that the file is free from errors otherwise 
things would not look good. Following is the simple Hello World PHP code
 example, just for a basic guideline for some beginners&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;lt;?php&lt;br /&gt;
echo '&amp;lt;p&amp;gt;Hello World&amp;lt;/p&amp;gt;';&lt;br /&gt;
&amp;nbsp;?&amp;gt;&lt;/blockquote&gt;
&lt;br /&gt;
After creating the file with all your desired codes make sure you save 
it in .PHP extension. For example, mybloggerlab.php, you can use 
NotePad++ for writing codes because it is the only FREE standard 
developing tool.&lt;br /&gt;
&lt;br /&gt;
&lt;h4 style="text-align: left;"&gt;
Step#2:&amp;nbsp;Hosting a PHP File:&lt;/h4&gt;
Since, blogger does not allow you to host any kind of files like PHP, 
HTML or CSS. Therefore, you have to either host it on your hosting (if 
you have) or you can use Google Drive to host them for FREE. We have 
already written a detailed tutorial on It, &lt;a href="http://codejunction.blogspot.com/2012/02/how-to-host-css-or-javascript-files-in.html" target="_blank"&gt;so read it here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
You can also use Dropbox, and many other free hosting services but 
certainly they are not better than the features and reliability of 
Google Drive.&lt;br /&gt;
&lt;br /&gt;
&lt;h4 style="text-align: left;"&gt;
Step#3:&amp;nbsp;Adding &amp;nbsp;PHP Codes in Blogger&lt;/h4&gt;
After creating and hosting the PHP file, login into your Blogger 
account. Once logged in, head over to the dashboard and select the blog 
on which you would like to add PHP Codes. Now it depends on your needs 
whether you want to add the PHP code in posts, pages, sidebar or footer.
 Just paste the following code anywhere you would like to display the 
PHP file.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;lt;object width="400" height="300" type="text/html" data="&amp;nbsp;your-file.php"&amp;gt;&amp;lt;/object&amp;gt;&lt;/blockquote&gt;
&lt;br /&gt;
Don’t forget to replace your-file.php with the URL of your own PHP file 
that you may have got while hosting it on services like Google Drive 
Dropbox and etc.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Congratulations:&lt;/b&gt; You have successfully added PHP codes to 
blogger. Go and check your blog to see if things are working as planned.
 Let us know, if you have a better way of doing this job.&lt;br /&gt;
&lt;br /&gt;
We hope this tutorial has helped you in learning how to add PHP codes in
 blogger. Still, this is not the most accurate way because we are just 
using a iFrame technique to include the codes. Blogger needs to think 
more on making its platform friendly for the developers so that they can
 bring awesomeness to their blogs and websites.&lt;/div&gt;
</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>How to Press and Send Ctrl-Alt-Del in Remote Desktop Connection Window</title><link>http://codejunction.blogspot.com/2012/04/how-to-press-and-send-ctrl-alt-del-in.html</link><category>MSTSC</category><category>RDC</category><category>Remote Desktop</category><category>Windows</category><category>Windows 7</category><category>Windows Server 2008</category><author>noreply@blogger.com (Unknown)</author><pubDate>Wed, 18 Apr 2012 13:05:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-3013888488365798062</guid><description>&lt;p&gt;Remote Desktop Connection client allows user to remotely connect and administer another Windows computer that is running Microsoft Terminal Services. As with most remote control system or even virtualization process, which effectively and virtually run two or more system on a single physical machine, user will have problem to trigger Control-Alt-Delete (Ctrl+Alt+Del) keyboard shortcut key combination.&lt;br&gt;Ctrl-Alt-Del keyboard shortcut has been commonly used since IBM PC with DOS era to perform soft reboot, and used in modern Windows system to activate Winlogon process (log on to Windows NT), open Task Manager or Windows Security dialog box that allows user to log off, lock computer, shutdown PC, run Task Manager, switch user and other functions. &lt;p&gt;However, whenever trying to trigger Ctrl-Alt-Del function on remote system connected via Remote Desktop Connection, the keyboard shortcut combination pressed will bring up the Ctrl+Alt-Del function on the local machine instead of the machine remotely logged on via RDC. &lt;p&gt;This behavior is by design though, as Ctrl-Alt-Del key combination is too important for any PC (to run especially when computer encounters halt error or hang). As such, Ctrl-Alt-Del keyboard shortcut is always reserved for local host computer. &lt;p&gt;In order to send Ctrl-Alt-Del keystrokes to remote computer connected via Remote Desktop client, just press the following workaround: &lt;p&gt;&lt;strong&gt;Ctrl+Alt+End&lt;/strong&gt;  </description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>Tools To Simulate CPU / Memory / Disk Load</title><link>http://codejunction.blogspot.com/2012/03/tools-to-simulate-cpu-memory-disk-load.html</link><category>CPU</category><category>Disk</category><category>Load</category><category>Memory</category><category>Simulate</category><category>Tool</category><author>noreply@blogger.com (Unknown)</author><pubDate>Tue, 27 Mar 2012 23:23:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-4786511836695459225</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;header class="entry-header single" style="background-color: white; box-sizing: border-box; color: #333333; font-family: &amp;quot;Segoe UI&amp;quot;, Tahoma, Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px;"&gt;&lt;hr style="border-bottom: 0px; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: content-box; height: 0px; margin-bottom: 20px; margin-top: 10px;" /&gt;
&lt;/header&gt;&lt;div class="entry-content single" style="background-color: white; box-sizing: border-box; color: #333333; font-family: &amp;quot;Segoe UI&amp;quot;, Tahoma, Arial, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, sans-serif; font-size: 14px; overflow: hidden;"&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
Lot of people search for tools to simulate high CPU, Memory and Disk issues. Here are the tools we can use&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
&lt;span style="box-sizing: border-box; font-weight: 700;"&gt;&lt;u style="box-sizing: border-box;"&gt;Simulate High CPU Usage&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
&lt;a href="http://download.sysinternals.com/files/CPUSTRES.zip" style="background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration-line: none;"&gt;CPUSTRES.EXE&lt;/a&gt;&amp;nbsp;is a tool you can use to simulate High CPU usage by an user mode process. Its available for download from the Windows Sysinternals website.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
Here I have used CPUSTRES to simulate 50% CPU usage.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
&lt;a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/21/metablogapi/2818.clip_image002_6AEB9DC8.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-21-metablogapi/2818.clip_5F00_image002_5F00_6AEB9DC8.jpg" style="background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration-line: none;"&gt;&lt;img alt="clip_image002" border="0" height="560" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-21-metablogapi/4075.clip_5F00_image002_5F00_thumb_5F00_2B5E3A78.jpg" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/21/metablogapi/4075.clip_image002_thumb_2B5E3A78.jpg" style="background-image: none; border: 0px; box-sizing: border-box; display: inline; height: auto; max-width: 100%; vertical-align: middle;" title="clip_image002" width="619" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
CPUSTRES also has options to change the priority of the threads it spawns.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
&lt;span style="box-sizing: border-box; font-weight: 700;"&gt;&lt;u style="box-sizing: border-box;"&gt;Simulate High Memory Usage&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
To simulate high memory usage you can use the&amp;nbsp;&lt;a href="http://download.sysinternals.com/files/TestLimit.zip" style="background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration-line: none;"&gt;TestLimit&lt;/a&gt;&amp;nbsp;tool from the Sysinternals website. TestLimit can be used to simulate a variety of memory leak issues. Here I am using TestLimit to reduce the Available memory on my machine.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
&lt;a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/21/metablogapi/3482.clip_image0025_5C30CC16.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-21-metablogapi/3482.clip_5F00_image0025_5F00_5C30CC16.jpg" style="background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration-line: none;"&gt;&lt;img alt="clip_image002[5]" border="0" height="584" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-21-metablogapi/1351.clip_5F00_image0025_5F00_thumb_5F00_4BD5545D.jpg" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/21/metablogapi/1351.clip_image0025_thumb_4BD5545D.jpg" style="background-image: none; border: 0px; box-sizing: border-box; display: inline; height: auto; max-width: 100%; vertical-align: middle;" title="clip_image002[5]" width="542" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
&lt;a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/21/metablogapi/6153.clip_image0027_3050525A.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-21-metablogapi/6153.clip_5F00_image0027_5F00_3050525A.jpg" style="background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration-line: none;"&gt;&lt;img alt="clip_image002[7]" border="0" height="592" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-21-metablogapi/4571.clip_5F00_image0027_5F00_thumb_5F00_6671CAA9.jpg" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/21/metablogapi/4571.clip_image0027_thumb_6671CAA9.jpg" style="background-image: none; border: 0px; box-sizing: border-box; display: inline; height: auto; max-width: 100%; vertical-align: middle;" title="clip_image002[7]" width="539" /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
&lt;span style="box-sizing: border-box; font-weight: 700;"&gt;&lt;u style="box-sizing: border-box;"&gt;Simulate High Disk Activity&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
&lt;a href="http://www.microsoft.com/en-in/download/details.aspx?id=20163" style="background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration-line: none;"&gt;SQLIO&lt;/a&gt;&amp;nbsp;is a tool for benchmarking the I/O capacity of a given storage system. It can simulate sequential and random I/O and is usually used to test storage systems for SQL Server installations.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
&lt;a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/21/metablogapi/5460.image_637C65F6.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-21-metablogapi/5460.image_5F00_637C65F6.png" style="background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration-line: none;"&gt;&lt;img alt="image" border="0" height="639" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-21-metablogapi/3021.image_5F00_thumb_5F00_6F31AD28.png" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/21/metablogapi/3021.image_thumb_6F31AD28.png" style="background-image: none; border: 0px; box-sizing: border-box; display: inline; height: auto; max-width: 100%; vertical-align: middle;" title="image" width="719" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
SQLIO is an useful tool that you can use to simulate high disk activity.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
&lt;span style="box-sizing: border-box; font-weight: 700;"&gt;&lt;u style="box-sizing: border-box;"&gt;Simulate High Disk Usage&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
Another useful tool to simulate these issues is consume.exe. It ships with Windows SDK and can be used to consume resources like CPU, memory and disk. Here I am using consume.exe to simulate low disk space issues.&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
&lt;a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/21/metablogapi/8625.image_1F0C4EEA.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-21-metablogapi/8625.image_5F00_1F0C4EEA.png" style="background-color: transparent; box-sizing: border-box; color: #337ab7; text-decoration-line: none;"&gt;&lt;img alt="image" border="0" height="326" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-75-21-metablogapi/7711.image_5F00_thumb_5F00_6AF7AF96.png" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/75/21/metablogapi/7711.image_thumb_6AF7AF96.png" style="background-image: none; border: 0px; box-sizing: border-box; display: inline; height: auto; max-width: 100%; vertical-align: middle;" title="image" width="544" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style="box-sizing: border-box; margin-bottom: 10px;"&gt;
&lt;span style="box-sizing: border-box; font-weight: 700;"&gt;NOTE : Use these tools with extreme caution as they can freeze the machine you run them on and you might end up rebooting the machine.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</description><georss:featurename xmlns:georss="http://www.georss.org/georss">New York, NY, USA</georss:featurename><georss:point xmlns:georss="http://www.georss.org/georss">40.7127753 -74.0059728</georss:point><georss:box xmlns:georss="http://www.georss.org/georss">39.9423093 -75.296866299999991 41.483241299999996 -72.7150793</georss:box><enclosure length="2296272" type="application/octet-stream" url="http://download.sysinternals.com/files/CPUSTRES.zip"/><itunes:explicit/><itunes:subtitle>Lot of people search for tools to simulate high CPU, Memory and Disk issues. Here are the tools we can use Simulate High CPU Usage CPUSTRES.EXE&amp;nbsp;is a tool you can use to simulate High CPU usage by an user mode process. Its available for download from the Windows Sysinternals website. Here I have used CPUSTRES to simulate 50% CPU usage. CPUSTRES also has options to change the priority of the threads it spawns. Simulate High Memory Usage To simulate high memory usage you can use the&amp;nbsp;TestLimit&amp;nbsp;tool from the Sysinternals website. TestLimit can be used to simulate a variety of memory leak issues. Here I am using TestLimit to reduce the Available memory on my machine. &amp;nbsp; Simulate High Disk Activity SQLIO&amp;nbsp;is a tool for benchmarking the I/O capacity of a given storage system. It can simulate sequential and random I/O and is usually used to test storage systems for SQL Server installations. SQLIO is an useful tool that you can use to simulate high disk activity. Simulate High Disk Usage Another useful tool to simulate these issues is consume.exe. It ships with Windows SDK and can be used to consume resources like CPU, memory and disk. Here I am using consume.exe to simulate low disk space issues. NOTE : Use these tools with extreme caution as they can freeze the machine you run them on and you might end up rebooting the machine.</itunes:subtitle><itunes:author>noreply@blogger.com (Unknown)</itunes:author><itunes:summary>Lot of people search for tools to simulate high CPU, Memory and Disk issues. Here are the tools we can use Simulate High CPU Usage CPUSTRES.EXE&amp;nbsp;is a tool you can use to simulate High CPU usage by an user mode process. Its available for download from the Windows Sysinternals website. Here I have used CPUSTRES to simulate 50% CPU usage. CPUSTRES also has options to change the priority of the threads it spawns. Simulate High Memory Usage To simulate high memory usage you can use the&amp;nbsp;TestLimit&amp;nbsp;tool from the Sysinternals website. TestLimit can be used to simulate a variety of memory leak issues. Here I am using TestLimit to reduce the Available memory on my machine. &amp;nbsp; Simulate High Disk Activity SQLIO&amp;nbsp;is a tool for benchmarking the I/O capacity of a given storage system. It can simulate sequential and random I/O and is usually used to test storage systems for SQL Server installations. SQLIO is an useful tool that you can use to simulate high disk activity. Simulate High Disk Usage Another useful tool to simulate these issues is consume.exe. It ships with Windows SDK and can be used to consume resources like CPU, memory and disk. Here I am using consume.exe to simulate low disk space issues. NOTE : Use these tools with extreme caution as they can freeze the machine you run them on and you might end up rebooting the machine.</itunes:summary><itunes:keywords>CPU, Disk, Load, Memory, Simulate, Tool</itunes:keywords></item><item><title>How to Host CSS or JavaScript Files in Blogger using Google Drive </title><link>http://codejunction.blogspot.com/2012/02/how-to-host-css-or-javascript-files-in.html</link><category>blogger</category><category>blogspot</category><category>Drop Box</category><category>Google drive</category><category>Hosting</category><category>php</category><category>SkyDrive</category><author>noreply@blogger.com (Unknown)</author><pubDate>Sun, 12 Feb 2012 16:02:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-2295283631681492417</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div style="text-align: justify;"&gt;
Hosting CSS and JavaScript files on your Blogger blog has always been a 
matter of concern for a webmaster. People prefers to add their entire 
StyleSheet coding in one file, so they can upload it to their hosting 
and can easily apply it on their website. &amp;nbsp;Unfortunately, blogger has 
quite a few limitations
 that stop you from hosting CSS and JavaScript files. Recently our user 
sent us an email asking: is there any way to host files on blogger? What
 are the advantages of hosting CSS (StyleSheet) files? &amp;nbsp;Luckily, Google 
Drive provides you the opportunity to host CSS, JavaScript and HTML 
Files for FREE. In this article, we will show you How to Host CSS Files 
with Google Drive in Blogger?&lt;/div&gt;
&lt;a href="https://www.blogger.com/null" name="more"&gt;&lt;/a&gt;&lt;br /&gt;
&lt;h4 style="text-align: left;"&gt;
Why to Host files on Google Drive?&lt;/h4&gt;
&lt;div style="text-align: justify;"&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Lots of Space:&lt;/b&gt; Google Drive provides you 5 GB storage to 
regular accounts so you can easily upload lots of documents. However, if
 your disk space is full, then you can upgrade your account from basic 
to premium.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Create &amp;amp; collaborate: &lt;/b&gt;Google Drive provides you the 
flexibility to create and host different kinds of spreadsheets and 
presentations. Make some edits in the documents and see real-time 
changes as they appear.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Reliable &amp;amp; Dependable:&lt;/b&gt; With 100% uptime, it provides you 
the freedom to host anything that you like. It has unlimited bandwidth, 
but you have to take care of your disk space it should not exceed 5GB 
mark or you can upgrade your account.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Go back and revise:&lt;/b&gt; Google drive tracks almost all the change
 that you make to your document - so whenever you will save a document, a
 new revision also gets save. You can take a glance back and can make 
revision accordingly.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Share or make files Private: &lt;/b&gt;You can share your files and 
folders with anyone. Select whether others can comment, share, view or 
edit your stuff. You can handle everything instantly from your 
dashboard.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Security at its best: &lt;/b&gt;Google Drive has always proven to be 
the most reliable free hosting service with unlimited bandwidth. 
Moreover, to provide full proof security Google drive has utilized HTTPS
 encryption to keep your documents secure.&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;All This For Free: &lt;/b&gt;All these impressive features for free.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 style="text-align: left;"&gt;
What are the Advantages of Hosting CSS/JavaScript in one File?&lt;/h4&gt;
&lt;div style="text-align: justify;"&gt;
Blogger doesn’t provide its users the flexibility to host CSS or 
JavaScript files in one separate link. They are hosted within the 
website’s coding through HTML Tags.&amp;nbsp;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
For StyleSheet, &amp;lt;style&amp;gt; tag is use to define the style information
 for an HTML document. &amp;nbsp;Between two &amp;lt;style&amp;gt;&amp;lt;/style&amp;gt; tags, 
CSS coding is placed which specify how HTML elements should render in 
the web browser. Each HTML document can contain multiple &amp;lt;style&amp;gt; 
tags.&amp;nbsp;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
For JavaScript &amp;lt;script&amp;gt; tag is use to define the script, such as 
JavaScript. The &amp;lt;script&amp;gt; tag either contains the scripting 
statements or it points to an external file through src attribute. Each 
HTML document can contain multiple &amp;lt;script&amp;gt; tags.&amp;nbsp;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
Combining all StyleSheet/JavaScript coding in 1 file helps a website to 
load faster. Furthermore, it helps search engine to crawl your site 
smoothly.&amp;nbsp;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;/div&gt;
&lt;h4 style="text-align: left;"&gt;
How to Host CSS Files with Google Drive in Blogger:&lt;/h4&gt;
&lt;div style="text-align: justify;"&gt;
There are several third-party apps that could help you to host files in 
blogger including Google Apps, Google Code, and Google App bot. At 
MyBloggerLab, we use App bot, but the process of hosting files on Appbot
 is a lot complex. Google Drive is perfect and works better than Appbot 
because there is no need to worry about the bandwidth.&amp;nbsp;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;b&gt;Step#1: Copying CSS Coding From You Template:
&lt;/b&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
To host your CSS file with Google Drive in Blogger, first thing you need
 to do is to copy your all StyleSheet coding from your template to an 
empty notepad. Go to Blogger » Your site » Template » Edit HTML » 
Proceed and search for the &amp;lt;b:skin&amp;gt;&amp;lt;![CDATA[ tag. On finding 
this tag, you will see a large chunk of CSS coding, so copy all the CSS 
coding till the ]]&amp;gt;&amp;lt;/b:skin&amp;gt; tag. &amp;nbsp;For more details see the 
following screenshot.&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKQJs2MdtQ4sV9WDJ2u7MW6jFdMMO_AsxCeEAewOGe2cUdMZl3Myk5-uhMJ3qVJ1AtZZzmkcgVdelpwaNQmqedW1vsdDGNHUgqWbCSdgMrKM84nLWSBye0ArZZ-gQ1zHX7PBMkVZofcXhH/s1600/copy-css-coding-blogge.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKQJs2MdtQ4sV9WDJ2u7MW6jFdMMO_AsxCeEAewOGe2cUdMZl3Myk5-uhMJ3qVJ1AtZZzmkcgVdelpwaNQmqedW1vsdDGNHUgqWbCSdgMrKM84nLWSBye0ArZZ-gQ1zHX7PBMkVZofcXhH/s1600/copy-css-coding-blogge.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;b&gt;Step#2: Preparing a style.css file&lt;/b&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
After copying the CSS coding, remove it from your template and paste the
 coding in an empty new notepad. Now save the document and name the file
 to style.css (the extension of the file should be in .css so the 
browser can render it as StyleSheet). For more details see the following
 screenshot.&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1ejnnSmzCD2daOGRVLKaNwHKiz-yMk42hV-EBKxPrQtnFM4hHg8lphZD6W2EK652RpB0Mdha2Wn-aeOnlm1fTLGx-u_bMRTNgQV7UPtYZykFDLeYKjNSukOPHMMf8v4_m9JOxLxILt2nc/s1600/createing-a-css-file-of-stylesheet-document.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1ejnnSmzCD2daOGRVLKaNwHKiz-yMk42hV-EBKxPrQtnFM4hHg8lphZD6W2EK652RpB0Mdha2Wn-aeOnlm1fTLGx-u_bMRTNgQV7UPtYZykFDLeYKjNSukOPHMMf8v4_m9JOxLxILt2nc/s1600/createing-a-css-file-of-stylesheet-document.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;b&gt;Step#3: Hosting your style.css file on Google Drive:&lt;/b&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
The next thing is to upload style.css file to your Google Drive account.
 First go to Google Drive and login into your Gmail Account. Now you 
have to create a new folder, so you can upload all the web hosting files
 at one place. Press the “Create” button and from the drop down list 
select “Folder”. Now name the folder to anything that you like such as 
webhost, web files and etc. In the end, press "Create" to conclude. &amp;nbsp;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzSZeOdue_srVtiwUQF4xOXKRdgnKHeyiAv4P24UEOq3VnEhlODD6VxGftQvF8-94qME6GWoY7Tpv319CZvGx3Cbt5pkakkBw6syUMHTmEdJoKP6K5QYS-aWu84itwCay-LmrUM2chDxJR/s1600/Create-new-folder-in-google-drive.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzSZeOdue_srVtiwUQF4xOXKRdgnKHeyiAv4P24UEOq3VnEhlODD6VxGftQvF8-94qME6GWoY7Tpv319CZvGx3Cbt5pkakkBw6syUMHTmEdJoKP6K5QYS-aWu84itwCay-LmrUM2chDxJR/s1600/Create-new-folder-in-google-drive.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
Now open the folders that you have created a few moments ago (right 
click on the folder name and select open). On selecting the upload icon 
present on the left side of your screen, a drop down list will appear 
which would provide you two choices i.e. File and Folder. Just select 
“File” and move to the next step.&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgglHe-UvsXnCF-6Ps9pu_ysVEz51qWp0pvsgPN1DXBpAtfK5LQywdPABwgn2JBcPFhyphenhyphenRhKpWCbaM53Ilkr6qRrAwIYIkzohPZaBYOo7oBscftmcsGhEEZX1wi5hNQq6FoddQJ6YsH7gEz1/s1600/uploading-file-google-drive.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgglHe-UvsXnCF-6Ps9pu_ysVEz51qWp0pvsgPN1DXBpAtfK5LQywdPABwgn2JBcPFhyphenhyphenRhKpWCbaM53Ilkr6qRrAwIYIkzohPZaBYOo7oBscftmcsGhEEZX1wi5hNQq6FoddQJ6YsH7gEz1/s1600/uploading-file-google-drive.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
Now it will request you to select the style.css documents that you 
created few moments a go. After selecting the file, press the open 
button and move to the next step.&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2p0g9E8Y8NkyBNDoMnMy2OvW8TNX6XA5ntA8X0wJlGuv4KSAiuOlUEN_dBN3a18EBgZelGT56JzIbLpvcmClHdXUQN83GUVaUrY8fooiSbiMGm1Jhajg5rKCbYiMu-S4sz69qd_7_zP3d/s1600/style.css-file-to-blogger.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2p0g9E8Y8NkyBNDoMnMy2OvW8TNX6XA5ntA8X0wJlGuv4KSAiuOlUEN_dBN3a18EBgZelGT56JzIbLpvcmClHdXUQN83GUVaUrY8fooiSbiMGm1Jhajg5rKCbYiMu-S4sz69qd_7_zP3d/s1600/style.css-file-to-blogger.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
On pressing the open button a small upload wizard would appear on the 
right side of your screen. It usually takes a minute or two to upload, 
but it entirely depends upon the size of your file and the speed of your
 internet connection.&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbqicLJixf6kUt_txM6WdLeMhjiQTx8pwyor0vPrs8Hhb-dXyJrZlNemwqvPPCv9AAlo5Z5R5Tjjbxj5ftwxdbh1r7utgBuTaHW-7EcMHCiSI7Q-1aG-Ox_U0l4EMwkNQfnEvnisAOkaSY/s1600/uploading-file-google-drive.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbqicLJixf6kUt_txM6WdLeMhjiQTx8pwyor0vPrs8Hhb-dXyJrZlNemwqvPPCv9AAlo5Z5R5Tjjbxj5ftwxdbh1r7utgBuTaHW-7EcMHCiSI7Q-1aG-Ox_U0l4EMwkNQfnEvnisAOkaSY/s1600/uploading-file-google-drive.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
Once uploading is done, press the “Share” button. Now you have to make 
this file available for public. Press change, and select “public on the 
web” so anyone on the Internet can find and access. Finally, press the 
Save button to conclude the wizard. For detailed instructions, check out
 the following screenshot.&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;div style="text-align: center;"&gt;
&lt;img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjAJLBrSO03JimfJc4y_6nPzgVk0_rLyTfvr8Au1iFpL9L5FqNGWtyGZ52vZ2jKfozKMGFaAaRmBm1_o2bcefKOEam6TmrwRB00_qJhYeNV_9u0kRCzQO2A89xBtV4gHvy1h2fzYklkNgeA/s1600/Google-Drive-Sharing-setting-Private-to-Public.png" /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;b&gt;Step#4: Getting a Proper Hosting Link&lt;/b&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
The second last step is to prepare a proper hosting link of your 
style.css file. Right click on the file that you uploaded few moments a 
go and select “Share”. Copy the whole URL present in the text area under
 “Link to share”. For more details see the following screenshot.&amp;nbsp;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvoI7aQluyQd1sdcCHPORTxEvlyU_RV42thIOjy-E8lrwQ_SlTJGB9uMSXe2J2uLN9jVQaHtkJhlXMIb4dsguiTugXc-z_u9AwoVVUZDazbrXUe_rKlq_veIg8f1fXQVT7qiKyZGjJYoaO/s1600/Share-google-drive-document.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvoI7aQluyQd1sdcCHPORTxEvlyU_RV42thIOjy-E8lrwQ_SlTJGB9uMSXe2J2uLN9jVQaHtkJhlXMIb4dsguiTugXc-z_u9AwoVVUZDazbrXUe_rKlq_veIg8f1fXQVT7qiKyZGjJYoaO/s1600/Share-google-drive-document.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh814dshaORvoS9GPu_YU53X0vAVI3qJluTWCH23tksoE-3QeHQA_n81L82rUJalxVqv3-rwaHFT_LmnJIWTRb2la2jJl3u9r96EGgED6ecvQgiBz3bI3wtvKkqIq97P8t_7OQ2GnB_tSL6/s1600/Share-google-drive-link.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh814dshaORvoS9GPu_YU53X0vAVI3qJluTWCH23tksoE-3QeHQA_n81L82rUJalxVqv3-rwaHFT_LmnJIWTRb2la2jJl3u9r96EGgED6ecvQgiBz3bI3wtvKkqIq97P8t_7OQ2GnB_tSL6/s1600/Share-google-drive-link.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
After Copying the sharing Link from google drive, it would somewhat looks like this &lt;i&gt;https://docs.google.com/file/d/&lt;span style="color: #38761d;"&gt;your-file-code&lt;/span&gt;/&lt;/i&gt;. You have to change the copied link to &lt;i&gt;https://googledrive.com/host/&lt;span style="color: #38761d;"&gt;your-file-code&lt;/span&gt;&lt;/i&gt;. &lt;span style="color: red;"&gt;Remember: &lt;/span&gt;Make sure “your-file-code” remains the same before and after the changes are made.&amp;nbsp;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcPcGOlOCBl15M7maA76nUrXL2oIZ4LJ_Qk08TwLXk_r2-RxkaGCPxr6dM3qwX1BK8ItYwQBI97Hs-K_aUV84F7yKCdpi3tGmhlteBF96fX2kzpnuAshQvdDUcPcWuJnd4N27Ed51Y_LQv/s1600/Google-Drive-Web-Host-URL.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcPcGOlOCBl15M7maA76nUrXL2oIZ4LJ_Qk08TwLXk_r2-RxkaGCPxr6dM3qwX1BK8ItYwQBI97Hs-K_aUV84F7yKCdpi3tGmhlteBF96fX2kzpnuAshQvdDUcPcWuJnd4N27Ed51Y_LQv/s1600/Google-Drive-Web-Host-URL.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
let us do a small&amp;nbsp;demonstration which would help you in explaining better.&amp;nbsp;For Example, if the link of my file is &lt;i&gt;https://docs.google.com/file/d/&lt;span style="color: #38761d;"&gt;0B0WJjcJEFNzibXRyZWlwNktKcFk&lt;/span&gt;/&lt;/i&gt; so I will change it to &lt;i&gt;https://googledrive.com/host/&lt;span style="color: #38761d;"&gt;0B0WJjcJEFNzibXRyZWlwNktKcFk&lt;/span&gt;&lt;/i&gt;. The only thing which remains the same is the file code.&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;b&gt;Step#5: Adding Google Drive Hosted CSS file in Blogger&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
After preparing a proper hosting link of your file, once again go to 
Blogger » Your site » Template » Edit HTML » Proceed. Now search for the
 starting &amp;lt;head&amp;gt; tag and just above it paste the following code. &lt;span style="color: red;"&gt;Remember: &lt;/span&gt;Do not forget to replace &lt;i&gt;https://googledrive.com/host/your-file-code&lt;/i&gt;
 with your Google drive hosting link, and make sure you have removed the
 CSS coding from the template as we have mentioned in the step#1. Once 
everything is done, press the “Save Template” button.&amp;nbsp;&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;/div&gt;
&lt;div style="text-align: justify;"&gt;
&lt;blockquote class="tr_bq"&gt;
&amp;lt;link href='&lt;span style="color: #38761d;"&gt;https://googledrive.com/host/your-file-code&lt;/span&gt;' rel='stylesheet'/&amp;gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
If you are still confused about the process then check out this in-depth video tutorial&lt;/div&gt;
</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKQJs2MdtQ4sV9WDJ2u7MW6jFdMMO_AsxCeEAewOGe2cUdMZl3Myk5-uhMJ3qVJ1AtZZzmkcgVdelpwaNQmqedW1vsdDGNHUgqWbCSdgMrKM84nLWSBye0ArZZ-gQ1zHX7PBMkVZofcXhH/s72-c/copy-css-coding-blogge.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>When Should I use WPF Vs Silverlight</title><link>http://codejunction.blogspot.com/2011/12/when-should-i-use-wpf-vs-silverlight.html</link><category>WPF Vs Silverlight</category><author>noreply@blogger.com (Unknown)</author><pubDate>Fri, 9 Dec 2011 14:05:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-520398375475570931</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;In my role, I work with a number of large corporations, and this is a question that they ask me regularly: What is the difference between the Windows Presentation Foundation (WPF) and Silverlight, and in what scenarios does it make sense to use each?  &lt;br /&gt;
Microsoft feels that user experience is important, and invested in multiple technologies to promote better user experience.  Both WPF and Silverlight use XAML (Extensible Application Markup Language) under the covers.  &lt;br /&gt;
Let's look at some of the different characteristics of each technology: &lt;br /&gt;
&lt;br /&gt;
WPF:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Ships as part of the .NET Framework (version 3.0 and onward) &lt;/li&gt;
&lt;li&gt;Runs as Windows application or as web "browser application" (called XBAP, for "XAML Browser Application").  Note that XBAPs run only in Internet Explorer with .NET 3.0 and in both Internet Explorer and Firefox with .NET 3.5.   &lt;/li&gt;
&lt;li&gt;Runs on Windows machines only (Windows XP, Windows Server 2003, Windows Vista, and Windows Server 2008) &lt;/li&gt;
&lt;li&gt;Richest functionality, including 3D graphics &lt;/li&gt;
&lt;/ul&gt;Silverlight:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Ships independently &lt;/li&gt;
&lt;li&gt;Runs in web browsers only (Internet Explorer, Firefox, Safari) &lt;/li&gt;
&lt;li&gt;Runs on Windows or Mac operating systems (also on Linux via &lt;a href="http://www.mono-project.com/Moonlight"&gt;Moonlight&lt;/a&gt;, which is an open source implementation of Silverlight based on Mono) &lt;/li&gt;
&lt;li&gt;Functionality is a subset of WPF's feature set &lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
When should you use each?  The maddening answer is (of course): it depends!  &lt;br /&gt;
WPF is a more mature technology and was designed with a richer feature set.  It also has the advantage of being able to run in a browser or as an installed Windows-Form-type app.  &lt;br /&gt;
Silverlight has a broader reach.  You can access Silverlight from &lt;a href="http://www.microsoft.com/silverlight/resources/install.aspx?v=2.0#sysreq"&gt;many operating systems and web browsers&lt;/a&gt;.  &lt;br /&gt;
The most important reason to choose one over the other should be based on the intended audience for the application.  For example, if a corporation is designing an application for internal use only and every employee has Windows XP as the company standard OS, then go with WPF to leverage the richer feature set.  If a corporation is designing an external-facing website, then Silverlight is the better choice because potential customers can access the website from a variety of different operating systems and browsers. &lt;/div&gt;</description></item><item><title>Entity Framework 4.0- Bind Stored Procedure with Result Entity class</title><link>http://codejunction.blogspot.com/2011/08/entity-framework-40-bind-stored.html</link><category>.Net 4.0</category><category>ADO.Net</category><category>Entity Framework</category><author>noreply@blogger.com (Manasa)</author><pubDate>Sat, 13 Aug 2011 22:12:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-2434300343861582638</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Microsoft Entity Framework version 4.0 is a brand new ORM(Object Relational Mapper) from Microsoft. It’s provides now some new features which are not there in the earlier version of Entity framework. Let’s walk through a simple example of a new features which will create a new Entity class based on stored procedure result. We will use same table for this example for which they have used earlier for Linq Binding with Custom Entity.&lt;br /&gt;
Below is the table which have simple fields like first name,last name etc.&lt;img alt="SQL Table for Entity Example." border="0" height="454" mce_src="http://weblogs.asp.net/blogs/jalpeshpvadgama/SQLTable_thumb_61FD2DA8.jpg" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/SQLTable_thumb_61FD2DA8.jpg" style="border-width: 0px; display: inline;" title="SQL Table for Entity Example." width="604" /&gt; &lt;br /&gt;
Let’s insert some data like following.&lt;br /&gt;
&lt;img alt="Sample data for Entity Framework Example" border="0" height="454" mce_src="http://weblogs.asp.net/blogs/jalpeshpvadgama/SQLTableData_thumb_6FA4E545.jpg" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/SQLTableData_thumb_6FA4E545.jpg" style="border-width: 0px; display: inline;" title="Sample data for Entity Framework Example" width="604" /&gt; &lt;br /&gt;
Below is the stored procedure which I am going to use for this example which will simply fetch data from the table.&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:034230e8-ec90-466e-b8b5-0fce8debaf28" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;&lt;div&gt;&lt;div class="syntaxhighlighter  sql ie" id="highlighter_278924"&gt;&lt;div class="toolbar"&gt;&lt;a class="toolbar_item command_help help" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2010/08/18/entity-framework-4-0-bind-stored-procedure-with-result-entity-class.aspx#"&gt;?&lt;/a&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;1&lt;/div&gt;&lt;div class="line number2 index1 alt1"&gt;2&lt;/div&gt;&lt;div class="line number3 index2 alt2"&gt;3&lt;/div&gt;&lt;div class="line number4 index3 alt1"&gt;4&lt;/div&gt;&lt;div class="line number5 index4 alt2"&gt;5&lt;/div&gt;&lt;div class="line number6 index5 alt1"&gt;6&lt;/div&gt;&lt;div class="line number7 index6 alt2"&gt;7&lt;/div&gt;&lt;div class="line number8 index7 alt1"&gt;8&lt;/div&gt;&lt;div class="line number9 index8 alt2"&gt;9&lt;/div&gt;&lt;div class="line number10 index9 alt1"&gt;10&lt;/div&gt;&lt;div class="line number11 index10 alt2"&gt;11&lt;/div&gt;&lt;div class="line number12 index11 alt1"&gt;12&lt;/div&gt;&lt;div class="line number13 index12 alt2"&gt;13&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;&lt;div class="line number1 index0 alt2"&gt;&lt;code class="sql keyword"&gt;CREATE&lt;/code&gt; &lt;code class="sql keyword"&gt;PROCEDURE&lt;/code&gt; &lt;code class="sql plain"&gt;dbo.GetAllUsers&lt;/code&gt;&lt;/div&gt;&lt;div class="line number2 index1 alt1"&gt;&lt;code class="sql spaces"&gt; &lt;/code&gt; &lt;/div&gt;&lt;div class="line number3 index2 alt2"&gt;&lt;code class="sql keyword"&gt;AS&lt;/code&gt;&lt;/div&gt;&lt;div class="line number4 index3 alt1"&gt;&lt;code class="sql spaces"&gt; &lt;/code&gt;&lt;code class="sql keyword"&gt;SET&lt;/code&gt; &lt;code class="sql plain"&gt;NOCOUNT &lt;/code&gt;&lt;code class="sql keyword"&gt;ON&lt;/code&gt;&lt;/div&gt;&lt;div class="line number5 index4 alt2"&gt;&lt;code class="sql spaces"&gt; &lt;/code&gt;&lt;code class="sql keyword"&gt;SELECT&lt;/code&gt;&lt;/div&gt;&lt;div class="line number6 index5 alt1"&gt;&lt;code class="sql spaces"&gt;  &lt;/code&gt;&lt;code class="sql plain"&gt;UserId,&lt;/code&gt;&lt;/div&gt;&lt;div class="line number7 index6 alt2"&gt;&lt;code class="sql spaces"&gt;  &lt;/code&gt;&lt;code class="sql plain"&gt;UserName,&lt;/code&gt;&lt;/div&gt;&lt;div class="line number8 index7 alt1"&gt;&lt;code class="sql spaces"&gt;  &lt;/code&gt;&lt;code class="sql plain"&gt;FirstName,&lt;/code&gt;&lt;/div&gt;&lt;div class="line number9 index8 alt2"&gt;&lt;code class="sql spaces"&gt;  &lt;/code&gt;&lt;code class="sql plain"&gt;LastName,&lt;/code&gt;&lt;/div&gt;&lt;div class="line number10 index9 alt1"&gt;&lt;code class="sql spaces"&gt;  &lt;/code&gt;&lt;code class="sql plain"&gt;FirstName + &lt;/code&gt;&lt;code class="sql string"&gt;' '&lt;/code&gt; &lt;code class="sql plain"&gt;+ LastName &lt;/code&gt;&lt;code class="sql keyword"&gt;AS&lt;/code&gt; &lt;code class="sql plain"&gt;[FullName]&lt;/code&gt;&lt;/div&gt;&lt;div class="line number11 index10 alt2"&gt;&lt;/div&gt;&lt;div class="line number12 index11 alt1"&gt;&lt;code class="sql spaces"&gt; &lt;/code&gt;&lt;code class="sql keyword"&gt;FROM&lt;/code&gt; &lt;code class="sql plain"&gt;dbo.Users&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
Now let’s create Entity model class just like below via Project-&amp;gt;Add New Item-&amp;gt;Go to Data tab and then select ADO.NET Entity Data Model.&lt;br /&gt;
&lt;img alt="Adding a New Enity model class for Entity Framework example" border="0" height="436" mce_src="http://weblogs.asp.net/blogs/jalpeshpvadgama/AddNewEntityModel_thumb_202ACDE2.jpg" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/AddNewEntityModel_thumb_202ACDE2.jpg" style="border-width: 0px; display: inline;" title="Adding a New Enity model class for Entity Framework example" width="604" /&gt; &lt;br /&gt;
Once you click add a dialog box will appear which will ask for Data Model Contents there are two options Generate From Database and another one is Empty Model. Generate from database will create a Entity model from the ready made database while Empty model enable us to create a model first and then it will allow us to create a database from our model. We are going to use Generate From database for this example. Select Generate From Database like following and click Next.&lt;br /&gt;
&lt;img alt="Generating Model from database for Entity Framework 4.0 Example" border="0" height="552" mce_src="http://weblogs.asp.net/blogs/jalpeshpvadgama/GenerateFromDatabase_thumb_473A88B9.jpg" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/GenerateFromDatabase_thumb_473A88B9.jpg" style="border-width: 0px; display: inline;" title="Generating Model from database for Entity Framework 4.0 Example" width="604" /&gt; &lt;br /&gt;
After click on the next it will ask for database connection string like following where you need to apply connection string for that. I am already having connection string in my web.config so i just selected like below otherwise you need to create one via clicking on new connection. Also you need to specify the connection string name in web.config so it will put a connection string in connection string section with that name.&lt;br /&gt;
&lt;img alt="MyConnection" border="0" height="552" mce_src="http://weblogs.asp.net/blogs/jalpeshpvadgama/MyConnection_thumb_582E90CF.jpg" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/MyConnection_thumb_582E90CF.jpg" style="border-width: 0px; display: inline;" title="MyConnection" width="604" /&gt; &lt;br /&gt;
Once you click next it will fetch the all database objects information like Tables,Views and Stored Procedure like following. Here our purpose is to work with stored procedure so I just selected the stored procedure and selected the GetAllUsers Stored Procedure. &lt;br /&gt;
&lt;img alt="Selecting Stored procedure " border="0" height="552" mce_src="http://weblogs.asp.net/blogs/jalpeshpvadgama/StoredProcedure_thumb_6F320DA0.jpg" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/StoredProcedure_thumb_6F320DA0.jpg" style="border-width: 0px; display: inline;" title="Selecting Stored procedure " width="604" /&gt; &lt;br /&gt;
After that it will create a Entity Model class in solution explorer.Now we want to bind the stored procedure with result class so first we need to create function which will call ‘GetAllUser’ stored procedure. To create function we just need to select Our Entity Model class and then go to Model Browser and select the Stored Procedure and right click-&amp;gt;Add Function Import like following image. &lt;br /&gt;
&lt;img alt="Importing a function from stored procedure example." border="0" height="454" mce_src="http://weblogs.asp.net/blogs/jalpeshpvadgama/FunctionImport_thumb_255B3803.jpg" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/FunctionImport_thumb_255B3803.jpg" style="border-width: 0px; display: inline;" title="Importing a function from stored procedure example." width="604" /&gt; &lt;br /&gt;
It will start a new wizard and will go to next step like following image which will have four options 1. None 2. Scalars 3. Complex 4. Entities and there will be a button Get Column information once you click it. It will gather all the column information of stored procedure result set and then click ‘Create New Complex Type’ It will create a new complex type from the gathered column information. &lt;br /&gt;
&lt;img alt="Gathering a column info and then " border="0" height="735" mce_src="http://weblogs.asp.net/blogs/jalpeshpvadgama/GetColumnInformation_thumb_06C8F96D.jpg" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/GetColumnInformation_thumb_06C8F96D.jpg" style="border-width: 0px; display: inline;" title="Gathering a column info and then " width="604" /&gt; &lt;br /&gt;
You can also rename that class so I have renamed the class as ‘User Info’ like following.&lt;img alt="UserInfo" border="0" height="735" mce_src="http://weblogs.asp.net/blogs/jalpeshpvadgama/UserInfo_thumb_2118C6B7.jpg" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/UserInfo_thumb_2118C6B7.jpg" style="border-width: 0px; display: inline;" title="UserInfo" width="604" /&gt; &lt;br /&gt;
Now click ok and now it will create function which call the stored procedure and will return Object Result set of Type ‘UserInfo’ which we have just created. Now let’s bind that to a simple grid view to see how its works. So Let’s take a simple grid view like below.&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:860fa9b3-bd75-430e-bd26-dbc5b110e44c" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;&lt;div&gt;&lt;div class="syntaxhighlighter  xml ie" id="highlighter_738259"&gt;&lt;div class="toolbar"&gt;&lt;a class="toolbar_item command_help help" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2010/08/18/entity-framework-4-0-bind-stored-procedure-with-result-entity-class.aspx#"&gt;?&lt;/a&gt;&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;1&lt;/div&gt;&lt;div class="line number2 index1 alt1"&gt;2&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;&lt;div class="line number1 index0 alt2"&gt;&lt;code class="xml plain"&gt;&amp;lt;&lt;/code&gt;&lt;code class="xml keyword"&gt;asp:GridView&lt;/code&gt; &lt;code class="xml color1"&gt;ID&lt;/code&gt;&lt;code class="xml plain"&gt;=&lt;/code&gt;&lt;code class="xml string"&gt;"grdUserList"&lt;/code&gt; &lt;code class="xml color1"&gt;runat&lt;/code&gt;&lt;code class="xml plain"&gt;=&lt;/code&gt;&lt;code class="xml string"&gt;"server"&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;div class="line number2 index1 alt1"&gt;&lt;code class="xml plain"&gt;&amp;lt;/&lt;/code&gt;&lt;code class="xml keyword"&gt;asp:GridView&lt;/code&gt;&lt;code class="xml plain"&gt;&amp;gt;&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;Now Let’s bind that grid view like following from the code behind file of asp.net like following.&lt;br /&gt;
&lt;div class="wlWriterSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:b19e5a09-0bdc-499e-86f0-b59a7508318d" style="display: inline; float: none; margin: 0px; padding: 0px;"&gt;&lt;div&gt;&lt;div class="syntaxhighlighter  csharp ie " id="highlighter_660574"&gt;&lt;div class="toolbar"&gt;&lt;a class="toolbar_item command_help help" href="http://weblogs.asp.net/jalpeshpvadgama/archive/2010/08/18/entity-framework-4-0-bind-stored-procedure-with-result-entity-class.aspx#"&gt;?&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table border="0" cellpadding="0" cellspacing="0"&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class="gutter"&gt;&lt;div class="line number1 index0 alt2"&gt;1&lt;/div&gt;&lt;div class="line number2 index1 alt1"&gt;2&lt;/div&gt;&lt;div class="line number3 index2 alt2"&gt;3&lt;/div&gt;&lt;div class="line number4 index3 alt1"&gt;4&lt;/div&gt;&lt;div class="line number5 index4 alt2"&gt;5&lt;/div&gt;&lt;div class="line number6 index5 alt1"&gt;6&lt;/div&gt;&lt;div class="line number7 index6 alt2"&gt;7&lt;/div&gt;&lt;div class="line number8 index7 alt1"&gt;8&lt;/div&gt;&lt;div class="line number9 index8 alt2"&gt;9&lt;/div&gt;&lt;div class="line number10 index9 alt1"&gt;10&lt;/div&gt;&lt;div class="line number11 index10 alt2"&gt;11&lt;/div&gt;&lt;div class="line number12 index11 alt1"&gt;12&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div class="container"&gt;&lt;div class="line number1 index0 alt2"&gt;&lt;code class="csharp keyword"&gt;protected&lt;/code&gt; &lt;code class="csharp keyword"&gt;void&lt;/code&gt; &lt;code class="csharp plain"&gt;Page_Load(&lt;/code&gt;&lt;code class="csharp keyword"&gt;object&lt;/code&gt; &lt;code class="csharp plain"&gt;sender, EventArgs e)&lt;/code&gt;&lt;/div&gt;&lt;div class="line number2 index1 alt1"&gt;&lt;code class="csharp plain"&gt;{&lt;/code&gt;&lt;/div&gt;&lt;div class="line number3 index2 alt2"&gt;&lt;code class="csharp spaces"&gt;    &lt;/code&gt;&lt;code class="csharp keyword"&gt;if&lt;/code&gt; &lt;code class="csharp plain"&gt;(!Page.IsPostBack)&lt;/code&gt;&lt;/div&gt;&lt;div class="line number4 index3 alt1"&gt;&lt;code class="csharp spaces"&gt;    &lt;/code&gt;&lt;code class="csharp plain"&gt;{&lt;/code&gt;&lt;/div&gt;&lt;div class="line number5 index4 alt2"&gt;&lt;code class="csharp spaces"&gt;      &lt;/code&gt;&lt;code class="csharp keyword"&gt;using&lt;/code&gt; &lt;code class="csharp plain"&gt;(BlogEntities myEntity = &lt;/code&gt;&lt;code class="csharp keyword"&gt;new&lt;/code&gt; &lt;code class="csharp plain"&gt;BlogEntities())&lt;/code&gt;&lt;/div&gt;&lt;div class="line number6 index5 alt1"&gt;&lt;code class="csharp spaces"&gt;      &lt;/code&gt;&lt;code class="csharp plain"&gt;{&lt;/code&gt;&lt;/div&gt;&lt;div class="line number7 index6 alt2"&gt;&lt;code class="csharp spaces"&gt;         &lt;/code&gt;&lt;code class="csharp plain"&gt;grdUserList.DataSource = myEntity.GetAllUsers();&lt;/code&gt;&lt;/div&gt;&lt;div class="line number8 index7 alt1"&gt;&lt;code class="csharp spaces"&gt;         &lt;/code&gt;&lt;code class="csharp plain"&gt;grdUserList.DataBind();  &lt;/code&gt;&lt;/div&gt;&lt;div class="line number9 index8 alt2"&gt;&lt;code class="csharp spaces"&gt;      &lt;/code&gt;&lt;code class="csharp plain"&gt;}&lt;/code&gt;&lt;/div&gt;&lt;div class="line number10 index9 alt1"&gt;&lt;code class="csharp spaces"&gt;    &lt;/code&gt;&lt;code class="csharp plain"&gt;}&lt;/code&gt;&lt;/div&gt;&lt;div class="line number11 index10 alt2"&gt;&lt;/div&gt;&lt;div class="line number12 index11 alt1"&gt;&lt;code class="csharp plain"&gt;}&lt;/code&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
Just run it with Ctrl + F5 and below it the output in browser.&lt;img alt="Output of Entity Framework 4.0 Example" border="0" height="454" mce_src="http://weblogs.asp.net/blogs/jalpeshpvadgama/Ouput_thumb_581CE7B4.jpg" src="http://weblogs.asp.net/blogs/jalpeshpvadgama/Ouput_thumb_581CE7B4.jpg" style="border-width: 0px; display: inline;" title="Output of Entity Framework 4.0 Example" width="604" /&gt; &lt;br /&gt;
&lt;br /&gt;
That’s it very easy and simple to bind complex type with stored procedure using ADO.NET Entity Framework 4.0. Hope this will help you.. Happy Programming!!!&lt;/div&gt;</description></item><item><title>SQL Server Enable xp_cmdshell Option</title><link>http://codejunction.blogspot.com/2011/07/sql-server-enable-xpcmdshell-option.html</link><category>Enable</category><category>sp_configure</category><category>SQL Server</category><category>xp_cmdshell</category><author>noreply@blogger.com (Unknown)</author><pubDate>Sun, 24 Jul 2011 15:29:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-3071522886390923240</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Introduced in SQL Server 2005, the &lt;strong&gt;xp_cmdshell&lt;/strong&gt; option is a server configuration option that enables system administrators to control whether the &lt;strong&gt;xp_cmdshell&lt;/strong&gt; extended stored procedure can be executed on a system. By default, the &lt;strong&gt;xp_cmdshell&lt;/strong&gt; option is disabled on new installations and can be enabled by using the Policy-Based Management or by running the &lt;strong&gt;sp_configure&lt;/strong&gt; system stored procedure as shown in the following code example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;&lt;span style="color: #274e13;"&gt;-- To allow advanced options to be changed.&lt;br /&gt;
EXEC sp_configure 'show advanced options', 1&lt;br /&gt;
GO&lt;br /&gt;
-- To update the currently configured value for advanced options.&lt;br /&gt;
RECONFIGURE&lt;br /&gt;
GO&lt;br /&gt;
-- To enable the feature.&lt;br /&gt;
EXEC sp_configure 'xp_cmdshell', 1&lt;br /&gt;
GO&lt;br /&gt;
-- To update the currently configured value for this feature.&lt;br /&gt;
RECONFIGURE&lt;br /&gt;
GO&lt;/span&gt;&lt;/em&gt;&lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item><item><title>SplineSeries for the Silverlight Toolkit - C# Code</title><link>http://codejunction.blogspot.com/2011/07/splineseries-for-silverlight-toolkit-c.html</link><category>C# Code</category><category>Silverlight</category><category>Spline Series</category><category>Toolkit</category><author>noreply@blogger.com (Unknown)</author><pubDate>Fri, 22 Jul 2011 13:39:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-2113559646996642572</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;While the Silverlight Toolkit has made some amazing strides in improving, it  still lacks some functionality compared to other toolkit offerings.  In  particular, Silverlight Toolkit's charts lack splines, or smoothed lines.  The  idea here is that we don't want the graph to appears as though a line is moving  from point to point directly -- that it moves parabolically, or softer.&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTx336_1Gyp7fnTzlOktGuIQcGawHeWIOFrb6UUCSF4jGUAAxRzxImtAJPXNJrHXxs_-e9eAq7zzXAyWroyYeGPH8fOcGhYf3cxNZZvCReaa4ZXDo_1p037yDXyCgPlH5hVBAUtRdmt19Q/s1600/LineSeries.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="176" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTx336_1Gyp7fnTzlOktGuIQcGawHeWIOFrb6UUCSF4jGUAAxRzxImtAJPXNJrHXxs_-e9eAq7zzXAyWroyYeGPH8fOcGhYf3cxNZZvCReaa4ZXDo_1p037yDXyCgPlH5hVBAUtRdmt19Q/s320/LineSeries.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-size: xx-small;"&gt;A typical line  series.&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;Now, this is all fun and games, but can we get something where transitions  are more smooth?  Yes, we can.&lt;/div&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtyk-zR74afOdqsFLUmBHkzDRafQi7ZtjVmyW9sYfOdtJnupOuwqSVZf8Du2jFkcMgbzr4s30NC72cJoKLR98wOi9iyzLbcAVRzYLV9diu_ll78TTl_haKtcrNML80PpnkfK4MgK8iioIp/s1600/Spline+Series.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="184" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtyk-zR74afOdqsFLUmBHkzDRafQi7ZtjVmyW9sYfOdtJnupOuwqSVZf8Du2jFkcMgbzr4s30NC72cJoKLR98wOi9iyzLbcAVRzYLV9diu_ll78TTl_haKtcrNML80PpnkfK4MgK8iioIp/s320/Spline+Series.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span class="Apple-style-span" style="font-size: xx-small; font-style: italic;"&gt;A   &lt;b&gt;spline&lt;/b&gt; series.&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;Notice, the spline  series changes are more gradual and curved.  Are they an entirely accurate  representation of the in-between?  No, not always -- but they're not meant to be  (necessarily).&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;The Spline Series is  literally a copy/paste of the LineSeries, with a few changes.  Note that this is  located under the Charting/Series folder of the DataVisualization.Toolkit  project.  Essentially, what we want to do is change the Polyline to a Path.  The  idea here is that a Polyline doesn't draw Beziers.  Below is my (large)  code,&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;SplineSeries.cs:&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;pre style="background: white; color: black; font-family: Consolas;"&gt;&lt;span style="color: green;"&gt;// (c) Copyright Microsoft Corporation.&lt;/span&gt;
&lt;span style="color: green;"&gt;// This source is subject to the Microsoft Public License (Ms-PL).&lt;/span&gt;
&lt;span style="color: green;"&gt;// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.&lt;/span&gt;
&lt;span style="color: green;"&gt;// All other rights reserved.&lt;/span&gt;
 
&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Collections.Generic;
&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Diagnostics.CodeAnalysis;
&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Linq;
&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Windows.Media;
&lt;span style="color: blue;"&gt;using&lt;/span&gt; System.Windows.Shapes;
 
&lt;span style="color: blue;"&gt;#if&lt;/span&gt; !DEFINITION_SERIES_COMPATIBILITY_MODE
 
&lt;span style="color: blue;"&gt;namespace&lt;/span&gt; System.Windows.Controls.DataVisualization.Charting
{
    &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
    &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Represents a control that contains a data series to be rendered in X/Y &lt;/span&gt;
    &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; line format.&lt;/span&gt;
    &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
    &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;QualityBand&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;Preview&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/QualityBand&amp;gt;&lt;/span&gt;
    [StyleTypedProperty(Property = DataPointStyleName, StyleTargetType = &lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(LineDataPoint))]
    [StyleTypedProperty(Property = &lt;span style="color: #a31515;"&gt;"LegendItemStyle"&lt;/span&gt;, StyleTargetType = &lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(LegendItem))]
    [StyleTypedProperty(Property = &lt;span style="color: #a31515;"&gt;"PathStyle"&lt;/span&gt;, StyleTargetType = &lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(Path))]
    [TemplatePart(Name = DataPointSeries.PlotAreaName, &lt;span style="color: #2b91af;"&gt;Type&lt;/span&gt; = &lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(Canvas))]
    [&lt;span style="color: #2b91af;"&gt;SuppressMessage&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"Microsoft.Maintainability"&lt;/span&gt;, &lt;span style="color: #a31515;"&gt;"CA1501:AvoidExcessiveInheritance"&lt;/span&gt;, Justification = &lt;span style="color: #a31515;"&gt;"Depth of hierarchy is necessary to avoid code duplication."&lt;/span&gt;)]
    &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;partial&lt;/span&gt; &lt;span style="color: blue;"&gt;class&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;SplineSeries&lt;/span&gt; : LineAreaBaseSeries&amp;lt;LineDataPoint&amp;gt;
    {
&lt;span style="color: blue;"&gt;        #region&lt;/span&gt; public PointCollection Points
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Gets the collection of points that make up the spline.&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: blue;"&gt;public&lt;/span&gt; PointCollection Points
        {
            &lt;span style="color: blue;"&gt;get&lt;/span&gt; { &lt;span style="color: blue;"&gt;return&lt;/span&gt; GetValue(PointsProperty) &lt;span style="color: blue;"&gt;as&lt;/span&gt; PointCollection; }
            &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;set&lt;/span&gt; { SetValue(PointsProperty, &lt;span style="color: blue;"&gt;value&lt;/span&gt;); }
        }
 
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Identifies the Points dependency property.&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;readonly&lt;/span&gt; DependencyProperty PointsProperty =
            DependencyProperty.Register(
                &lt;span style="color: #a31515;"&gt;"Points"&lt;/span&gt;,
                &lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(PointCollection),
                &lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(SplineSeries),
                &lt;span style="color: blue;"&gt;null&lt;/span&gt;);
&lt;span style="color: blue;"&gt;        #endregion&lt;/span&gt; public PointCollection Points
 
&lt;span style="color: blue;"&gt;        #region&lt;/span&gt; public PathGeometry SplinePoints
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Gets the collection of points that make up the line.&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: blue;"&gt;public&lt;/span&gt; PathGeometry SplinePoints
        {
            &lt;span style="color: blue;"&gt;get&lt;/span&gt; { &lt;span style="color: blue;"&gt;return&lt;/span&gt; GetValue(SplinePointsProperty) &lt;span style="color: blue;"&gt;as&lt;/span&gt; PathGeometry; }
            &lt;span style="color: blue;"&gt;private&lt;/span&gt; &lt;span style="color: blue;"&gt;set&lt;/span&gt; { SetValue(SplinePointsProperty, &lt;span style="color: blue;"&gt;value&lt;/span&gt;); }
        }
 
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Identifies the SplinePoints dependency property.&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;readonly&lt;/span&gt; DependencyProperty SplinePointsProperty =
            DependencyProperty.Register(
                &lt;span style="color: #a31515;"&gt;"SplinePoints"&lt;/span&gt;,
                &lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(PathGeometry),
                &lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(SplineSeries),
                &lt;span style="color: blue;"&gt;null&lt;/span&gt;);
&lt;span style="color: blue;"&gt;        #endregion&lt;/span&gt; public PathGeometry SplinePoints
 
&lt;span style="color: blue;"&gt;        #region&lt;/span&gt; public double SplineTension
 
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Gets or sets the tension in the beziers that make up the spline.&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;remarks&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; The greater the tension, the more straight/linear the spline will look.&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Less tension creates a more curvy spline.&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/remarks&amp;gt;&lt;/span&gt;
        &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;double&lt;/span&gt; SplineTension
        {
            &lt;span style="color: blue;"&gt;get&lt;/span&gt; { &lt;span style="color: blue;"&gt;return&lt;/span&gt; (&lt;span style="color: blue;"&gt;double&lt;/span&gt;) GetValue(SplineTensionProperty); }
            &lt;span style="color: blue;"&gt;set&lt;/span&gt; { SetValue(SplineTensionProperty, &lt;span style="color: blue;"&gt;value&lt;/span&gt;); }
        }
 
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Identifies the SplineTension dependency property.&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;readonly&lt;/span&gt; DependencyProperty SplineTensionProperty =
            DependencyProperty.Register(
                &lt;span style="color: #a31515;"&gt;"SplineTension"&lt;/span&gt;,
                &lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color: blue;"&gt;double&lt;/span&gt;),
                &lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(SplineSeries),
                &lt;span style="color: blue;"&gt;new&lt;/span&gt; PropertyMetadata(2.5));
&lt;span style="color: blue;"&gt;        #endregion&lt;/span&gt; public double SplineTension
 
&lt;span style="color: blue;"&gt;        #region&lt;/span&gt; public Style PathStyle
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Gets or sets the style of the Path object that follows the data &lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; points.&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        [System.Diagnostics.CodeAnalysis.&lt;span style="color: #2b91af;"&gt;SuppressMessage&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"Microsoft.Naming"&lt;/span&gt;, &lt;span style="color: #a31515;"&gt;"CA1704:IdentifiersShouldBeSpelledCorrectly"&lt;/span&gt;, MessageId = &lt;span style="color: #a31515;"&gt;"Path"&lt;/span&gt;, Justification = &lt;span style="color: #a31515;"&gt;"Matches System.Windows.Shapes.Path."&lt;/span&gt;)]
        &lt;span style="color: blue;"&gt;public&lt;/span&gt; Style PathStyle
        {
            &lt;span style="color: blue;"&gt;get&lt;/span&gt; { &lt;span style="color: blue;"&gt;return&lt;/span&gt; GetValue(PathStyleProperty) &lt;span style="color: blue;"&gt;as&lt;/span&gt; Style; }
            &lt;span style="color: blue;"&gt;set&lt;/span&gt; { SetValue(PathStyleProperty, &lt;span style="color: blue;"&gt;value&lt;/span&gt;); }
        }
 
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Identifies the PathStyle dependency property.&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        [System.Diagnostics.CodeAnalysis.&lt;span style="color: #2b91af;"&gt;SuppressMessage&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"Microsoft.Naming"&lt;/span&gt;, &lt;span style="color: #a31515;"&gt;"CA1704:IdentifiersShouldBeSpelledCorrectly"&lt;/span&gt;, MessageId = &lt;span style="color: #a31515;"&gt;"Path"&lt;/span&gt;, Justification = &lt;span style="color: #a31515;"&gt;"Matches System.Windows.Shapes.Path."&lt;/span&gt;)]
        &lt;span style="color: blue;"&gt;public&lt;/span&gt; &lt;span style="color: blue;"&gt;static&lt;/span&gt; &lt;span style="color: blue;"&gt;readonly&lt;/span&gt; DependencyProperty PathStyleProperty =
            DependencyProperty.Register(
                &lt;span style="color: #a31515;"&gt;"PathStyle"&lt;/span&gt;,
                &lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(Style),
                &lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(SplineSeries),
                &lt;span style="color: blue;"&gt;null&lt;/span&gt;);
&lt;span style="color: blue;"&gt;        #endregion&lt;/span&gt; public Style PathStyle
 
&lt;span style="color: blue;"&gt;#if&lt;/span&gt; !SILVERLIGHT
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Initializes the static members of the LineSeries class.&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        [&lt;span style="color: #2b91af;"&gt;SuppressMessage&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"Microsoft.Performance"&lt;/span&gt;, &lt;span style="color: #a31515;"&gt;"CA1810:InitializeReferenceTypeStaticFieldsInline"&lt;/span&gt;, Justification = &lt;span style="color: #a31515;"&gt;"Dependency properties are initialized in-line."&lt;/span&gt;)]
        &lt;span style="color: blue;"&gt;static&lt;/span&gt; SplineSeries()
        {
            DefaultStyleKeyProperty.OverrideMetadata(&lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(SplineSeries), &lt;span style="color: blue;"&gt;new&lt;/span&gt; FrameworkPropertyMetadata(&lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(SplineSeries)));
        }
 
&lt;span style="color: blue;"&gt;#endif&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Initializes a new instance of the LineSeries class.&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: blue;"&gt;public&lt;/span&gt; SplineSeries()
        {
&lt;span style="color: blue;"&gt;#if&lt;/span&gt; SILVERLIGHT
&lt;span style="color: grey;"&gt;            this.DefaultStyleKey = typeof(SplineSeries);&lt;/span&gt;
&lt;span style="color: blue;"&gt;#endif&lt;/span&gt;
        }
 
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Acquire a horizontal linear axis and a vertical linear axis.&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;param name=&lt;/span&gt;&lt;span style="color: grey;"&gt;"firstDataPoint"&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;The first data point.&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span style="color: blue;"&gt;protected&lt;/span&gt; &lt;span style="color: blue;"&gt;override&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; GetAxes(DataPoint firstDataPoint)
        {
            GetAxes(
                firstDataPoint,
                (axis) =&amp;gt; axis.Orientation == AxisOrientation.X,
                () =&amp;gt;
                {
                    IAxis axis = CreateRangeAxisFromData(firstDataPoint.IndependentValue);
                    &lt;span style="color: blue;"&gt;if&lt;/span&gt; (axis == &lt;span style="color: blue;"&gt;null&lt;/span&gt;)
                    {
                        axis = &lt;span style="color: blue;"&gt;new&lt;/span&gt; CategoryAxis();
                    }
                    axis.Orientation = AxisOrientation.X;
                    &lt;span style="color: blue;"&gt;return&lt;/span&gt; axis;
                },
                (axis) =&amp;gt; axis.Orientation == AxisOrientation.Y &amp;amp;&amp;amp; axis &lt;span style="color: blue;"&gt;is&lt;/span&gt; IRangeAxis,
                () =&amp;gt;
                {
                    DisplayAxis axis = (DisplayAxis)CreateRangeAxisFromData(firstDataPoint.DependentValue);
                    &lt;span style="color: blue;"&gt;if&lt;/span&gt; (axis == &lt;span style="color: blue;"&gt;null&lt;/span&gt;)
                    {
                        &lt;span style="color: blue;"&gt;throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;InvalidOperationException&lt;/span&gt;(Properties.Resources.DataPointSeriesWithAxes_NoSuitableAxisAvailableForPlottingDependentValue);
                    }
                    axis.ShowGridLines = &lt;span style="color: blue;"&gt;true&lt;/span&gt;;
                    axis.Orientation = AxisOrientation.Y;
                    &lt;span style="color: blue;"&gt;return&lt;/span&gt; axis;
                });
        }
 
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; Updates the Series shape object from a collection of Points.&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/summary&amp;gt;&lt;/span&gt;
        &lt;span style="color: grey;"&gt;///&lt;/span&gt;&lt;span style="color: green;"&gt; &lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;param name=&lt;/span&gt;&lt;span style="color: grey;"&gt;"points"&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;gt;&lt;/span&gt;&lt;span style="color: green;"&gt;Collection of Points.&lt;/span&gt;&lt;span style="color: grey;"&gt;&amp;lt;/param&amp;gt;&lt;/span&gt;
        &lt;span style="color: blue;"&gt;protected&lt;/span&gt; &lt;span style="color: blue;"&gt;override&lt;/span&gt; &lt;span style="color: blue;"&gt;void&lt;/span&gt; UpdateShapeFromPoints(IEnumerable&amp;lt;Point&amp;gt; points)
        {
            &lt;span style="color: blue;"&gt;if&lt;/span&gt; (points.Any())
            {
                PointCollection pointCollection = &lt;span style="color: blue;"&gt;new&lt;/span&gt; PointCollection();
                &lt;span style="color: blue;"&gt;foreach&lt;/span&gt; (Point point &lt;span style="color: blue;"&gt;in&lt;/span&gt; points)
                {
                    pointCollection.Add(point);
                }
 
                &lt;span style="color: green;"&gt;//At least two points are necessary to generate a proper spline&lt;/span&gt;
                &lt;span style="color: blue;"&gt;if&lt;/span&gt; (pointCollection.Count &amp;gt;= 2)
                {
                    PathGeometry geometry = &lt;span style="color: blue;"&gt;new&lt;/span&gt; PathGeometry();
                    PathFigure figure = &lt;span style="color: blue;"&gt;new&lt;/span&gt; PathFigure();
 
                    PointCollection bezierPoints = GetBezierPoints(pointCollection);
 
                    figure.StartPoint = bezierPoints[0];
                    &lt;span style="color: blue;"&gt;for&lt;/span&gt; (&lt;span style="color: blue;"&gt;int&lt;/span&gt; i = 1; i &amp;lt; bezierPoints.Count; i += 3)
                    {
                        figure.Segments.Add(&lt;span style="color: blue;"&gt;new&lt;/span&gt; BezierSegment()
                            {
                                Point1 = bezierPoints[i],
                                Point2 = bezierPoints[i + 1],
                                Point3 = bezierPoints[i + 2]
                            });
                    }
 
                    geometry.Figures.Add(figure);
                    SplinePoints = geometry;
                }
                &lt;span style="color: blue;"&gt;else&lt;/span&gt;
                {
                    SplinePoints = &lt;span style="color: blue;"&gt;null&lt;/span&gt;;
                }
 
                Points = pointCollection;
            }
            &lt;span style="color: blue;"&gt;else&lt;/span&gt;
            {
                Points = &lt;span style="color: blue;"&gt;null&lt;/span&gt;;
                SplinePoints = &lt;span style="color: blue;"&gt;null&lt;/span&gt;;
            }
        }
 
&lt;span style="color: blue;"&gt;        #region&lt;/span&gt; Bezier Curve Building
 
        &lt;span style="color: green;"&gt;/*&lt;/span&gt;
&lt;span style="color: green;"&gt;         * Formulas and code pulled from Kerem Kat's MapBezier example:&lt;/span&gt;
&lt;span style="color: green;"&gt;         * http://www.codeproject.com/KB/silverlight/MapBezier.aspx&lt;/span&gt;
&lt;span style="color: green;"&gt;         */&lt;/span&gt; 
 
        &lt;span style="color: blue;"&gt;private&lt;/span&gt; PointCollection GetBezierPoints(PointCollection pts)
        {
            PointCollection ret = &lt;span style="color: blue;"&gt;new&lt;/span&gt; PointCollection();
 
            &lt;span style="color: blue;"&gt;for&lt;/span&gt; (&lt;span style="color: blue;"&gt;int&lt;/span&gt; i = 0; i &amp;lt; pts.Count; i++)
            {
                &lt;span style="color: green;"&gt;// for first point append as is.&lt;/span&gt;
                &lt;span style="color: blue;"&gt;if&lt;/span&gt; (i == 0)
                {
                    ret.Add(pts[0]);
                    &lt;span style="color: blue;"&gt;continue&lt;/span&gt;;
                }
 
                &lt;span style="color: green;"&gt;// for each point except first and last get B1, B2. next point. &lt;/span&gt;
                &lt;span style="color: green;"&gt;// Last point do not have a next point.&lt;/span&gt;
                ret.Add(GetB1(pts, i - 1, SplineTension));
                ret.Add(GetB2(pts, i - 1, SplineTension));
                ret.Add(pts[i]);
            }
 
            &lt;span style="color: blue;"&gt;return&lt;/span&gt; ret;
        }
 
        &lt;span style="color: blue;"&gt;private&lt;/span&gt; Point GetB1(PointCollection pts, &lt;span style="color: blue;"&gt;int&lt;/span&gt; i, &lt;span style="color: blue;"&gt;double&lt;/span&gt; a)
        {
            Point  derivedPoint = GetDerivative(pts, i, a);
            &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; Point(pts[i].X + derivedPoint.X / 3, pts[i].Y + derivedPoint.Y / 3);
        }
 
        &lt;span style="color: blue;"&gt;private&lt;/span&gt; Point GetB2(PointCollection pts, &lt;span style="color: blue;"&gt;int&lt;/span&gt; i, &lt;span style="color: blue;"&gt;double&lt;/span&gt; a)
        {
            Point derivedPoint = GetDerivative(pts, i+1, a);
            &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; Point(pts[i + 1].X - derivedPoint.X / 3, pts[i + 1].Y - derivedPoint.Y / 3);
        }
 
        &lt;span style="color: blue;"&gt;private&lt;/span&gt; Point GetDerivative(PointCollection pts, &lt;span style="color: blue;"&gt;int&lt;/span&gt; i, &lt;span style="color: blue;"&gt;double&lt;/span&gt; a)
        {
            &lt;span style="color: blue;"&gt;if&lt;/span&gt; (pts.Count &amp;lt; 2)
                &lt;span style="color: blue;"&gt;throw&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; &lt;span style="color: #2b91af;"&gt;ArgumentOutOfRangeException&lt;/span&gt;(&lt;span style="color: #a31515;"&gt;"pts"&lt;/span&gt;, &lt;span style="color: #a31515;"&gt;"Data must contain at least two points."&lt;/span&gt;);
  
            &lt;span style="color: blue;"&gt;if&lt;/span&gt; (i == 0)
            {
                &lt;span style="color: green;"&gt;// First point.&lt;/span&gt;
                &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; Point((pts[1].X - pts[0].X) / a, (pts[1].Y - pts[0].Y) / a);
            }
            &lt;span style="color: blue;"&gt;if&lt;/span&gt; (i == pts.Count - 1)
            {
                &lt;span style="color: green;"&gt;// Last point.&lt;/span&gt;
                &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; Point((pts[i].X - pts[i - 1].X) / a, (pts[i].Y - pts[i - 1].Y) / a);
            }
  
            &lt;span style="color: blue;"&gt;return&lt;/span&gt; &lt;span style="color: blue;"&gt;new&lt;/span&gt; Point((pts[i + 1].X - pts[i - 1].X) / a, (pts[i + 1].Y - pts[i - 1].Y) / a);
        }
&lt;span style="color: blue;"&gt;        #endregion&lt;/span&gt;
    }
}
 
&lt;span style="color: blue;"&gt;#endif&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background-color: white; font-family: Consolas; font-size: 13px;"&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;Note that I borrowed my Spline/Bezier code from Kerem Kat's example: &lt;a href="http://www.codeproject.com/KB/silverlight/MapBezier.aspx"&gt;&lt;span style="color: #2288bb;"&gt;http://www.codeproject.com/KB/silverlight/MapBezier.aspx&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Essentially  what it does, is takes prior points to adjust such that they curve into the  next.  The UpdateShapeFromPoints method was changed from the standard LineSeries  and uses all of the helper methods that were added to calculate a Bezier  curve.&lt;br /&gt;
&lt;br /&gt;
We're pretty much almost done, except for one more minor touch.   We need to have the default style included, such that it complies with how  Silverlight Toolkit handles it's control templating.  We add the following chunk  of code to Themes\generic.xaml of the same project:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background: white; color: black; font-family: Consolas;"&gt;&lt;span style="color: #a31515;"&gt;    &lt;/span&gt;&lt;span style="color: green;"&gt;&amp;lt;!--  charting:SplineSeries  --&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Style&lt;/span&gt;&lt;span style="color: red;"&gt; TargetType&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"charting:SplineSeries"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Setter&lt;/span&gt;&lt;span style="color: red;"&gt; Property&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"IsTabStop"&lt;/span&gt;&lt;span style="color: red;"&gt; Value&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"False"&lt;/span&gt;&lt;span style="color: blue;"&gt; /&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Setter&lt;/span&gt;&lt;span style="color: red;"&gt; Property&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"PathStyle"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;                &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Style&lt;/span&gt;&lt;span style="color: red;"&gt; TargetType&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"Path"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;                    &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Setter&lt;/span&gt;&lt;span style="color: red;"&gt; Property&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"StrokeThickness"&lt;/span&gt;&lt;span style="color: red;"&gt; Value&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"2"&lt;/span&gt;&lt;span style="color: blue;"&gt; /&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;                    &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Setter&lt;/span&gt;&lt;span style="color: red;"&gt; Property&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"StrokeMiterLimit"&lt;/span&gt;&lt;span style="color: red;"&gt; Value&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"1"&lt;/span&gt;&lt;span style="color: blue;"&gt; /&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;                &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Style&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Setter&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Setter&lt;/span&gt;&lt;span style="color: red;"&gt; Property&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"Template"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;                &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;ControlTemplate&lt;/span&gt;&lt;span style="color: red;"&gt; TargetType&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"charting:SplineSeries"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;                    &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Canvas&lt;/span&gt;&lt;span style="color: red;"&gt; x&lt;/span&gt;&lt;span style="color: blue;"&gt;:&lt;/span&gt;&lt;span style="color: red;"&gt;Name&lt;/span&gt;&lt;span style="color: blue;"&gt;=&lt;/span&gt;&lt;span style="color: blue;"&gt;"PlotArea"&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;                        &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Path&lt;/span&gt;&lt;span style="color: red;"&gt; Data&lt;/span&gt;&lt;span style="color: blue;"&gt;="{&lt;/span&gt;&lt;span style="color: #a31515;"&gt;TemplateBinding&lt;/span&gt;&lt;span style="color: red;"&gt; SplinePoints&lt;/span&gt;&lt;span style="color: blue;"&gt;}&lt;/span&gt;&lt;span style="color: blue;"&gt;"&lt;/span&gt;&lt;span style="color: red;"&gt; Stroke&lt;/span&gt;&lt;span style="color: blue;"&gt;="{&lt;/span&gt;&lt;span style="color: #a31515;"&gt;TemplateBinding&lt;/span&gt;&lt;span style="color: red;"&gt; Background&lt;/span&gt;&lt;span style="color: blue;"&gt;}&lt;/span&gt;&lt;span style="color: blue;"&gt;"&lt;/span&gt;&lt;span style="color: red;"&gt; Style&lt;/span&gt;&lt;span style="color: blue;"&gt;="{&lt;/span&gt;&lt;span style="color: #a31515;"&gt;TemplateBinding&lt;/span&gt;&lt;span style="color: red;"&gt; PathStyle&lt;/span&gt;&lt;span style="color: blue;"&gt;}&lt;/span&gt;&lt;span style="color: blue;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt;/&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;                        &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Polyline&lt;/span&gt;&lt;span style="color: red;"&gt; Points&lt;/span&gt;&lt;span style="color: blue;"&gt;="{&lt;/span&gt;&lt;span style="color: #a31515;"&gt;TemplateBinding&lt;/span&gt;&lt;span style="color: red;"&gt; Points&lt;/span&gt;&lt;span style="color: blue;"&gt;}&lt;/span&gt;&lt;span style="color: blue;"&gt;"&lt;/span&gt;&lt;span style="color: blue;"&gt; /&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;                    &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Canvas&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;                &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;ControlTemplate&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;            &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;        &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Setter&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #a31515;"&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #a31515;"&gt;Style&lt;/span&gt;&lt;span style="color: blue;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="background: white; color: black; font-family: Consolas;"&gt;&lt;span style="color: blue;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;Now, just recompile the Toolkit and you should be good to  go!&lt;br /&gt;
&lt;br /&gt;
I've included a "patch" with these files and their updates -- they  should be capable of being pasted over their old versions (the  Themes\generic.xaml just has the SplineSeries.xaml pasted into it -- I would  strongly recommend you doing this with your own source):&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://docs.google.com/viewer?a=v&amp;amp;pid=explorer&amp;amp;chrome=true&amp;amp;srcid=0B9hGvs6yJgfJNzA4YmE1OTctNzNmYy00MzMzLWJhNDQtNTc0M2FlNTA3NzFm&amp;amp;hl=en_US"&gt;&lt;span style="color: #2288bb;"&gt;https://docs.google.com/viewer?a=v&amp;amp;pid=explorer&amp;amp;chrome=true&amp;amp;srcid=0B9hGvs6yJgfJNzA4YmE1OTctNzNmYy00MzMzLWJhNDQtNTc0M2FlNTA3NzFm&amp;amp;hl=en_US&lt;/span&gt;&lt;/a&gt;  &lt;/div&gt;</description><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTx336_1Gyp7fnTzlOktGuIQcGawHeWIOFrb6UUCSF4jGUAAxRzxImtAJPXNJrHXxs_-e9eAq7zzXAyWroyYeGPH8fOcGhYf3cxNZZvCReaa4ZXDo_1p037yDXyCgPlH5hVBAUtRdmt19Q/s72-c/LineSeries.png" width="72"/><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total></item><item><title>SilverlightToolkit Development/Building Guidance</title><link>http://codejunction.blogspot.com/2011/07/silverlighttoolkit-developmentbuilding.html</link><category>Building</category><category>Development</category><category>Guidance</category><category>Silverlight</category><category>Toolkit</category><author>noreply@blogger.com (Unknown)</author><pubDate>Tue, 12 Jul 2011 13:40:00 +0530</pubDate><guid isPermaLink="false">tag:blogger.com,1999:blog-7461113664020979506.post-2358139673205375032</guid><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If you're like me and want to alter some of Silverlight Toolkit's behavior (or  add more functionality to it), chances are your builds will not work perfectly  and you'll be in a constant state of mismatched assemblies.&lt;br /&gt;
&lt;br /&gt;
I've noticed  that Silverlight Toolkit has some major issues with the entire build process --  only loading different components and making references to other DLL's (which  get deleted if you perform a clean build), not other &lt;i&gt;projects&lt;/i&gt;.  The  second those are removed from the Binaries directory, the entire system goes to  hell and back, eventually grabbing references to your DLL's in the Silverlight  Toolkit install directory (somewhere in your root drive under Program Files,  etc).  What a pain!  Then you'd have to go back and rebuild the references  and re-specify their location.  There has to be a better way, right?&lt;br /&gt;
&lt;br /&gt;
Kind  of.&lt;br /&gt;
&lt;br /&gt;
What I ended up doing, and I highly recommend this for anyone working  with Silverlight Toolkit on a regular basis -- is to build a new solution,  rather than use the existing ones.  Don't worry about including their Design or  Testing projects, unless they're important to you. &lt;b&gt; &lt;/b&gt;Then follow this  process:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. Build a new solution and include all relevant  projects.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;As stated before, place everything that you actually care about  building.  In my case, I was only concerned about the actual controls - not the  testing or design.  Since I'm already heavily involved with using the controls,  I'll know if they're broken in test or design scenarios.&lt;/blockquote&gt;&lt;b&gt;2.  (Optional) Rename all projects to their full assembly name, rather than a  shorthand version.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;When viewing their projects, you'll notice things like Controls.Data  or System.Controls, which are all very misleading.  Everything falls under  System.Windows.*.  For sake of clarity, I found myself renaming them, so when I  would eventually add references back to other projects, I could see the full  name of the project/assembly built.&lt;/blockquote&gt;&lt;b&gt;3. Change build path in each  project, for all build-types, to a single directory.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;You'd be surprised how many different places the assemblies for  Silverlight Toolkit get built to.  Each project seems to be written by someone  else, with their own styles/paths for where assemblies that are built get  stored.  I simplified everything and made everything build to the Binaries  folder -- always. &lt;/blockquote&gt;&lt;b&gt;4. Referenced assemblies from other SDKs  should be placed in a special folder under the build path.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;This is a pattern we have at work -- if you build something that  requires a reference to an SDK other than our own, you drop the assembly in a  References project and store everything in source control for the entire team to  use.  You won't have to install the toolkits for other team members at this  point, since they'll be in a standard location.  For Design and Testing  projects, SilverlightToolkit uses other SDKs, so this is vital for those of you  wishing to build these.&lt;/blockquote&gt;&lt;b&gt;5. Remove all references to  SilverlightToolkit projects and re-add them as a reference to the projects in  your solution.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;As stated before, the references all get built to different places,  which can cause for some crazy issues when you perform a clean.  They then  default back to your SilverlightToolkit install.  It's horribly complicated.   Referencing your projects will create appropriate dependencies that cause  everything to build correctly and together.  You can imagine what will happen to  System.Windows.Controls.DataVisualizations when it tries to reference  System.Windows.Controls and the assemblies are built at different times with  different dependencies.  If you can't, imagine shear sacrilege.  And pain.  And  suffering.&lt;/blockquote&gt;If you follow these guidelines, you should have a much  more stable/clean build of SilverlightToolkit, which will make future  developments and enhancements easier to bake in (such as targeting a WPF  platform for Charting).  Unfortunately SilverlightToolkit also no longer accepts  user contributions, due to licensing issues, and Microsoft is the sole  development team.  This makes getting features added a little (read: very)  difficult.&lt;br /&gt;
&lt;br /&gt;
Good luck and happy building! &lt;/div&gt;</description><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total></item></channel></rss>