<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>.NET</title>
        <link>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/category/24.aspx</link>
        <description>.NET</description>
        <language>en-US</language>
        <copyright>Shawn Weisfeld</copyright>
        <generator>Subtext Version 2.1.2.2</generator>
        <item>
            <title>Developer&lt;T&gt;: Utilizing .NET Generics to write better code by Shawn Weisfeld @ UT Dallas .NET UG on 02/27/2010</title>
            <link>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2010/02/24/developert-utilizing-.net-generics-to-write-better-code-by-shawn.aspx</link>
            <description>&lt;p&gt;This Saturday (2/27) I will be giving my .NET Generics talk for the UT Dallas .NET UG in Richardson TX. If you are in the area please check it out (&lt;a href="http://www.usergroupsupportservices.com/UGEventView.ugss?EventID=9160"&gt;http://www.usergroupsupportservices.com/UGEventView.ugss?EventID=9160&lt;/a&gt;). If you cannot make it but are interested in seeing the talk, you can watch it online.&lt;/p&gt;
&lt;p&gt;&lt;embed height="300" type="application/x-shockwave-flash" width="400" src="http://blip.tv/play/hYpfgb_iWgA" allowfullscreen="true" allowscriptaccess="always" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Abstract:&lt;/strong&gt;&lt;br /&gt;
Generics let you tailor a method, class, structure, or interface to the precise data type it acts upon. In this session we will discuss what capabilities Generics provide to you the developer and how to use them in collections, and with delegates. We will also talk about creating your own generic classes and methods.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Download&lt;/strong&gt; &lt;br /&gt;
&lt;a href="http://www.developerroundtable.com/Libraries/Misc_Stuff/2009HustonTechFestGenerics.sflb.ashx?download=true"&gt;PowerPoint &amp;amp; Demos&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Bio:&lt;/strong&gt;&lt;br /&gt;
Shawn Weisfeld (shawn@shawnweisfeld.com) is a Staff Developer at a fortune 100 company, currently located at Dallas TX facility. There he specializes in intranet &amp;amp; smart client development for internal line of business applications. Besides his day job Shawn also is an Adjunct Professor at The Florida Institute of Technology (http://www.fit.edu). He also does freelance software development work for local small businesses and training. In his free time he volunteers with INETA NorAm (http://www.ineta.org) and is a member of the Board of Directors and Mentor for North Texas. Shawn started his career at his family business in Port St. Lucie FL while working on his undergraduate degree in Business Administration at the University of Central Florida and after a year off Shawn moved back to Orlando to pursue a Masters degree in Management Information Systems at The University of Central Florida and has since earned a second Masters degree in Computer Information Systems from Florida Institute of Technology. Shawn was awarded the Microsoft C# Most Valuable Professional award for 2007 - 2010. Shawn is an avid technology presenter and since July of 2005 Shawn has presented at many user group events, and even got to speak at the launch of Visual Studio. Shawn has served as the President of the Orlando .NET UG (http://www.onetug.org) from 2006 – 2008, and started the Developer Round Table UG (http://www.developerroundtable.com) in 2009. Shawn regularly attends, and records for INETA LIVE (http://live.ineta.org), many of the local user groups in the D/FW metroplex, including; D/FW Connected Systems UG, Dallas .NET UG, Dallas ASP.NET UG, Dallas C# Programming Sig, Dallas VSTS UG, North Dallas .NET UG, North Texas PC UG, UT Dallas .NET UG.  So be sure to say hello if you see him.&lt;/p&gt;&lt;img src="http://www.drowningintechnicaldebt.com/ShawnWeisfeld/aggbug/677.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Shawn Weisfeld</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2010/02/24/developert-utilizing-.net-generics-to-write-better-code-by-shawn.aspx</guid>
            <pubDate>Thu, 25 Feb 2010 01:45:54 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/677.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2010/02/24/developert-utilizing-.net-generics-to-write-better-code-by-shawn.aspx#feedback</comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/commentRss/677.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/services/trackbacks/677.aspx</trackback:ping>
        </item>
        <item>
            <title>Property Causing a Stack Dump</title>
            <link>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/06/16/property-causing-a-stack-dump.aspx</link>
            <description>&lt;p&gt;Got a call today, someone was getting a stack dump every time they tried to assign a value to a property. Here is a screen print of the problem they were having. can you spot the problem?&lt;/p&gt;  &lt;p&gt;&lt;a href="http://drowningintechnicaldebt.com/shawnweisfeld/clip_image001_74C9F7DB.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image001" border="0" alt="clip_image001" src="http://drowningintechnicaldebt.com/shawnweisfeld/clip_image001_thumb_33BB7877.jpg" width="488" height="822" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you said that the property is calling itself you get a gold star.  What was happening is that every time we tried to set the Name property, it calls the Name property to set it, and that called the Name property, and that called the Name property, over and over again, till .NET stack dumped. We are missing a backing variable. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://drowningintechnicaldebt.com/shawnweisfeld/clip_image0017_586C8FEE.jpg"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="clip_image001[7]" border="0" alt="clip_image001[7]" src="http://drowningintechnicaldebt.com/shawnweisfeld/clip_image0017_thumb_3E9859BF.jpg" width="444" height="643" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;By backing the property with a private variable, it removes the infinite recursion. Since the variable itself is private nobody can see it, or can use it outside the class, they are forced to use the property, and all is right with the world again!  &lt;/p&gt;&lt;img src="http://www.drowningintechnicaldebt.com/ShawnWeisfeld/aggbug/303.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sweisfeld</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/06/16/property-causing-a-stack-dump.aspx</guid>
            <pubDate>Tue, 16 Jun 2009 05:26:50 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/303.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/06/16/property-causing-a-stack-dump.aspx#feedback</comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/commentRss/303.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/services/trackbacks/303.aspx</trackback:ping>
        </item>
        <item>
            <title>Populating a Generic List in VB.NET</title>
            <link>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/06/16/populating-a-generic-list-in-vb-net.aspx</link>
            <description>&lt;p&gt;Got a question on how to populate a generic list in VB.NET, and while I am a C# guy, I figured I would show some VB.NET love. &lt;/p&gt;  &lt;p&gt;For this example I will be using a customer class, he is real simple just 2 properties. One for first name and one for last name. &lt;/p&gt;  &lt;p /&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;Class&lt;/span&gt; Customer&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; _first_name &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;Property&lt;/span&gt; FirstName() &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Get&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;            &lt;span class="kwrd"&gt;Return&lt;/span&gt; _first_name&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;        &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Get&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Set&lt;/span&gt;(&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; value &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;            _first_name = value&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;        &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Set&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Property&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Private&lt;/span&gt; _last_name &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;Property&lt;/span&gt; LastName() &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Get&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;            &lt;span class="kwrd"&gt;Return&lt;/span&gt; _last_name&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;        &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Get&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Set&lt;/span&gt;(&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; value &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;)&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;            _last_name = value&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;        &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Set&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Property&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;&lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Class&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p /&gt;

&lt;p&gt;Now that I have a class I can new up a list of that type:&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;Dim&lt;/span&gt; customers &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;New&lt;/span&gt; List(Of Customer)&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p /&gt;

&lt;p&gt;Now I can create an object of type customer set its properties and add it to the list:&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; c &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;New&lt;/span&gt; Customer&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;        c.FirstName = &lt;span class="str"&gt;"Shawn"&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;        c.LastName = &lt;span class="str"&gt;"Weisfeld"&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;        customers.Add(c)&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt;That is a bit tedious, lets simplify using the with statement:&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; c2 &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;New&lt;/span&gt; Customer&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;        &lt;span class="kwrd"&gt;With&lt;/span&gt; c2&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;            .FirstName = &lt;span class="str"&gt;"Shawn"&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;            .LastName = &lt;span class="str"&gt;"Weisfeld"&lt;/span&gt;&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;        &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;With&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        customers.Add(c2)&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p /&gt;

&lt;p&gt;Still too long, how about we create a constructor by adding the following code to our customer object: (NOTE: that I create 2 constructors, the first one that has no parameters is created by us automatically by VB.NET, however when we specify our own constructor VB.NET doesn’t give us the default one for free, so we have to code him up, assuming we wanted to have a parameter-less constructor)&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; &lt;span class="kwrd"&gt;New&lt;/span&gt;()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    &lt;span class="kwrd"&gt;End&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;    &lt;span class="kwrd"&gt;Public&lt;/span&gt; &lt;span class="kwrd"&gt;Sub&lt;/span&gt; &lt;span class="kwrd"&gt;New&lt;/span&gt;(&lt;span class="kwrd"&gt;ByVal&lt;/span&gt; first_name &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;, &lt;span class="kwrd"&gt;ByVal&lt;/span&gt; last_name &lt;span class="kwrd"&gt;As&lt;/span&gt; &lt;span class="kwrd"&gt;String&lt;/span&gt;)&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Me&lt;/span&gt;.FirstName = first_name&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Me&lt;/span&gt;.LastName = last_name&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;    &lt;span class="kwrd"&gt;End&lt;/span&gt; Sub&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt;Now that I have the constructor I can now new up the customer and add him to my list in one line of code:&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;        customers.Add(&lt;span class="kwrd"&gt;New&lt;/span&gt; Customer(&lt;span class="str"&gt;"Shawn"&lt;/span&gt;, &lt;span class="str"&gt;"Weisfeld"&lt;/span&gt;))&lt;/pre&gt;
&lt;/div&gt;

&lt;div class="csharpcode"&gt; &lt;/div&gt;

&lt;div class="csharpcode"&gt;Well that is all good, but what if we don’t own the class and cannot add constructors. Well VS.NET 2008 (.NET 3.5) includes something called Object Initializers:&lt;/div&gt;

&lt;div class="csharpcode"&gt; &lt;/div&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;        &lt;span class="kwrd"&gt;Dim&lt;/span&gt; c3 = &lt;span class="kwrd"&gt;New&lt;/span&gt; Customer() &lt;span class="kwrd"&gt;With&lt;/span&gt; {.FirstName = &lt;span class="str"&gt;"Shawn"&lt;/span&gt;, .LastName = &lt;span class="str"&gt;"Weisfeld"&lt;/span&gt;}&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;        customers.Add(c3)&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;That is better and we can even get it to a 1 line-er:&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;        customers.Add(&lt;span class="kwrd"&gt;New&lt;/span&gt; Customer() &lt;span class="kwrd"&gt;With&lt;/span&gt; {.FirstName = &lt;span class="str"&gt;"Shawn"&lt;/span&gt;, .LastName = &lt;span class="str"&gt;"Weisfeld"&lt;/span&gt;})&lt;/pre&gt;
&lt;/div&gt;
&lt;style type="text/css"&gt;&lt;![CDATA[
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }]]&gt;&lt;/style&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;Now your objects can go forth an multiply!&lt;/p&gt;&lt;img src="http://www.drowningintechnicaldebt.com/ShawnWeisfeld/aggbug/302.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sweisfeld</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/06/16/populating-a-generic-list-in-vb-net.aspx</guid>
            <pubDate>Tue, 16 Jun 2009 05:17:35 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/302.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/06/16/populating-a-generic-list-in-vb-net.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/commentRss/302.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/services/trackbacks/302.aspx</trackback:ping>
        </item>
        <item>
            <title>Couldn't attend MIX 09?</title>
            <link>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/05/19/couldn-t-attend-mix-09.aspx</link>
            <description>&lt;a href="http://drowningintechnicaldebt.com/shawnweisfeld/MIXNotes_073B72E3.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="" border="0" alt="" src="http://drowningintechnicaldebt.com/shawnweisfeld/MIXNotes_thumb_66B43330.png" width="244" height="68" /&gt;&lt;/a&gt;   &lt;p /&gt;  &lt;p&gt;We are bringing MIX to the DFW area, but instead of repeating the MIX conference, we are boiling down the best of MIX into a 1-day hands on lab. This community event, called MIX Notes, will provide hands-on examples presented by industry leaders. &lt;/p&gt;  &lt;p&gt;Computers will be provided, but participants are welcome to bring their own laptops. &lt;/p&gt;  &lt;p&gt;Where:                                 Tekfocus (in the InfoMart)   &lt;br /&gt;When:                                  June 20, 9 AM - 4 PM    &lt;br /&gt;Registration Fee:   $25 &lt;/p&gt;  &lt;p&gt;* Lunch will be provided &lt;/p&gt;  &lt;p&gt;Sign up today at &lt;a href="http://www.mixnotes.net"&gt;http://www.mixnotes.net&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.drowningintechnicaldebt.com/ShawnWeisfeld/aggbug/296.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sweisfeld</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/05/19/couldn-t-attend-mix-09.aspx</guid>
            <pubDate>Tue, 19 May 2009 05:23:08 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/296.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/05/19/couldn-t-attend-mix-09.aspx#feedback</comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/commentRss/296.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/services/trackbacks/296.aspx</trackback:ping>
        </item>
        <item>
            <title>Are you Coming to the Dallas Tech Fest 2009?</title>
            <link>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/05/09/are-you-coming-to-the-dallas-tech-fest-2009.aspx</link>
            <description>&lt;p&gt;I will be speaking at the Dallas Tech Fest, but that should not prevent you from coming. . . &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt; &lt;a href="http://dallastechfest.com" target="_blank"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Dallas%20TechFest%20Slide" border="0" alt="Dallas%20TechFest%20Slide" src="http://drowningintechnicaldebt.com/blogs/shawnweisfeld/Dallas20TechFest20Slide_0BEE0796.png" width="332" height="257" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.drowningintechnicaldebt.com/ShawnWeisfeld/aggbug/295.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sweisfeld</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/05/09/are-you-coming-to-the-dallas-tech-fest-2009.aspx</guid>
            <pubDate>Sun, 10 May 2009 03:15:09 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/295.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/05/09/are-you-coming-to-the-dallas-tech-fest-2009.aspx#feedback</comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/commentRss/295.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/services/trackbacks/295.aspx</trackback:ping>
        </item>
        <item>
            <title>System namespace conflict in SAP web services</title>
            <link>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/04/17/system-namespace-conflict-in-sap-web-services.aspx</link>
            <description>&lt;p&gt;My colleague, Jerome Nicolas, found a solution the problem outlined below and since he doesn't have a blog and we thought this was some great information we decided to post it to mine. Hope it helps.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: adding a web reference in Visual Studio to an SAP web service that was created from a remotely enabled function module with a table parameter associated type BAPIRET2.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;: The ABAP object BAPIRET2 is typically used to return messages when calling a BAPI, but it contains a field named “SYSTEM” which can conflict with the System namespace in .NET. If you create a web service from a function module that uses BAPIRET2 and try to set up a web reference in Visual Studio, you’ll get a build error like this:&lt;/p&gt;  &lt;p&gt;&lt;i&gt;An object reference is required for the nonstatic field, method, or property 'SAPWebService.SAPWebRef.Bapiret2.System.get'&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;for every line in Reference.cs that looks like this:&lt;/p&gt;  &lt;p&gt;System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;: To avoid this error without having to change the code in all your .NET applications that consume these web services, you can create a copy of BAPIRET2 in SAP and rename the SYSTEM field. In this case, we copied BAPIRET2 to ZRFC_BAPIRET2_TAB and renamed the SYSTEM field to SYSTEMSAP.&lt;/p&gt;  &lt;p&gt;Original BAPIRET2:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://drowningintechnicaldebt.com/blogs/shawnweisfeld/clip_image002_2577513F.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image002" border="0" alt="clip_image002" src="http://drowningintechnicaldebt.com/blogs/shawnweisfeld/clip_image002_thumb_7D64A21F.jpg" width="244" height="186" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;New object ZRFC_BAPIRET2_TAB&lt;/p&gt;  &lt;p&gt;&lt;a href="http://drowningintechnicaldebt.com/blogs/shawnweisfeld/clip_image004_15F43F70.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image004" border="0" alt="clip_image004" src="http://drowningintechnicaldebt.com/blogs/shawnweisfeld/clip_image004_thumb_6DE19050.jpg" width="244" height="186" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Then in your function module, use the new object instead of BAPIRET2.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://drowningintechnicaldebt.com/blogs/shawnweisfeld/clip_image006_1B62B014.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image006" border="0" alt="clip_image006" src="http://drowningintechnicaldebt.com/blogs/shawnweisfeld/clip_image006_thumb_012246F0.jpg" width="244" height="184" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now when you run the SAP web service wizard, it generates a WSDL with the new SYSTEMSAP field. And viola! No more build errors.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://drowningintechnicaldebt.com/blogs/shawnweisfeld/clip_image008_32ADB485.jpg"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="clip_image008" border="0" alt="clip_image008" src="http://drowningintechnicaldebt.com/blogs/shawnweisfeld/clip_image008_thumb_11BA41DE.jpg" width="244" height="195" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://www.drowningintechnicaldebt.com/ShawnWeisfeld/aggbug/292.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sweisfeld</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/04/17/system-namespace-conflict-in-sap-web-services.aspx</guid>
            <pubDate>Fri, 17 Apr 2009 16:55:41 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/292.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/04/17/system-namespace-conflict-in-sap-web-services.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/commentRss/292.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/services/trackbacks/292.aspx</trackback:ping>
        </item>
        <item>
            <title>What do your error messages reveal?</title>
            <link>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/03/09/what-do-your-error-messages-reveal.aspx</link>
            <description>&lt;p mce_keep="true"&gt;I know that most of you all know this already, but I figured it was worth a blog post since I just saw this from &lt;a href="http://www.autosite.com/"&gt;http://www.autosite.com&lt;/a&gt;. I got this very informative error message back when using their site earlier. . . &lt;/p&gt;
&lt;p mce_keep="true"&gt;Query Of Queries runtime error.&lt;br /&gt;Expected type STRING but encountered type NULL on the left of the LIKE condition  &lt;br /&gt;The error occurred in D:\INETPUB\wwwroot\content\Research\kbb\act_valueReport.cfm: line 74 &lt;br /&gt;Called from D:\INETPUB\WWWROOT\content\Research\kbb\index.cfm: line 21&lt;br /&gt;72 : &lt;br /&gt;73 :  &amp;lt;cfmodule template="mod_kbbtable.cfm" width="#kbbModTableWidth#"&amp;gt;&lt;br /&gt;74 :  &amp;lt;cfquery dbtype="query" name="qEquip"&amp;gt;&lt;br /&gt;75 :  SELECT * FROM valueReport.Equipments WHERE GroupCode LIKE 'M' ORDER BY DisplayOrder&lt;br /&gt;76 :  &amp;lt;/cfquery&amp;gt;&lt;/p&gt;
&lt;p mce_keep="true"&gt;While it is important for us as developers to log this type of information, there is NO reason for us to show it to our customers. Now I know table names, physical paths, and other good stuff. In your asp.net applicaitons make sure you set your customer errors to “On” (&lt;a href="http://msdn.microsoft.com/en-us/library/h0hfz6fc.aspx"&gt;http://msdn.microsoft.com/en-us/library/h0hfz6fc.aspx&lt;/a&gt;). You also want to make sure that you have logging so that you as the developer can triage errors. &lt;/p&gt;
&lt;p mce_keep="true"&gt;Oh and here is a BONUS TIP: Don’t use Select *, in most cases you don’t need all the columns and there is no reason to have the DB send them all back. . . . &lt;/p&gt;
&lt;p mce_keep="true"&gt;Let’s start a campaign to call out any website that we see on the internet that doesn’t properly hide their dirty laundry. &lt;br /&gt;&lt;/p&gt;&lt;img src="http://www.drowningintechnicaldebt.com/ShawnWeisfeld/aggbug/281.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sweisfeld</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/03/09/what-do-your-error-messages-reveal.aspx</guid>
            <pubDate>Mon, 09 Mar 2009 17:46:00 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/281.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/03/09/what-do-your-error-messages-reveal.aspx#feedback</comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/commentRss/281.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/services/trackbacks/281.aspx</trackback:ping>
        </item>
        <item>
            <title>A review of Professional DotNetNuke 5: Open Source Web Application Framework for ASP.NET from Wrox</title>
            <link>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/03/01/a-review-of-professional-dotnetnuke-5-open-source-web-application.aspx</link>
            <description>&lt;p&gt;A few weeks ago I got a copy of Professional DotNetNuke 5: Open Source Web Application Framework for ASP.NET (&lt;a href="http://www.amazon.com/Professional-DotNetNuke-Application-Framework-ASP-NET/dp/0470438703/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1235867832&amp;amp;sr=8-1"&gt;http://www.amazon.com/Professional-DotNetNuke-Application-Framework-ASP-NET/dp/0470438703/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1235867832&amp;amp;sr=8-1&lt;/a&gt;). Figured since I had been to presentations by 3 of the 5 authors I just had to have the book. Brian Scarbeau, Stan Schultes and Ryan Morgan are avid speakers in the Florida .NET community and knowing them I knew this book was going to be a good read. A cross country flight from Dallas Texas to Seattle Washington provided the perfect opportunity to concentrate on reading a new book. &lt;/p&gt;
&lt;p&gt;While waiting for my plane to take off I made it through the first chapter of the book written by the father of DotNetNuke Shaun Walker. This chapter talks about the history of where DNN came from and trials and tribulations that Shaun and his team had giving birth to what we know today. I think that anyone that is interested in starting an open source product should spend a few minutes and learn from the lessons that Shaun learned in the creation of DNN, especially if you are trying to build an open source product that sits on the very not open source Windows platform. &lt;/p&gt;
&lt;p&gt;The next few chapters of the book provide information on just about everything that administrator/end-user would need to know in order to go from an empty hosting account to having a DNN site. This includes installation, an overview of the modules and how to administer the lot. The next chunk of the book talks about the architecture of DNN. For years I have been telling developers looking for reference architectures to look at products like DNN. This set of chapters not only includes information on how the DNN team did what they did, but perhaps more importantly WHY they did it that way. For me knowing the why behind these types of decisions allows me to leverage the lessons learned by other developers and apply that to my applications, even non-DNN applications. The ability to learn from the experience/knowledge/mistakes of others makes us all better developers. The last chunk of the book is the how to information that you need to extend DNN. They cover modules, skinning, and distribution. &lt;/p&gt;
&lt;p&gt;This book provides a good overview of all the major components in the DNN products. It covers the architecture of the DNN infrastructure and how to extend it with your own custom modules and skins. This book provides the developer and the administrator what they need to get their feet wet with DNN, and as an added bonus you get a great narrative on the birth of an open source software package.&lt;/p&gt;
&lt;p&gt;BTW: At the time I wrote this DNN was the second most popular download on codeplex with just fewer than 20,000 downloads in the last 7 days. The only thing that beat it was a plug-in for World of Warcraft.  &lt;/p&gt;
&lt;p&gt;Oh and when my family needed a website for their small business guess what they got? (&lt;a href="http://www.apickygourmet.com/"&gt;http://www.apickygourmet.com&lt;/a&gt;)&lt;/p&gt;&lt;img src="http://www.drowningintechnicaldebt.com/ShawnWeisfeld/aggbug/280.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sweisfeld</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/03/01/a-review-of-professional-dotnetnuke-5-open-source-web-application.aspx</guid>
            <pubDate>Sun, 01 Mar 2009 07:12:00 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/280.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/03/01/a-review-of-professional-dotnetnuke-5-open-source-web-application.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/commentRss/280.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/services/trackbacks/280.aspx</trackback:ping>
        </item>
        <item>
            <title>SharePoint WebServices are your friend</title>
            <link>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/02/24/sharepoint-webservice-are-your-friend.aspx</link>
            <description>&lt;p&gt;Ever wanted access to that treasure trove of information available in SharePoint lists scattered across your enterprise? Ever wanted to provide a quick and dirty UI for users to enter data, but need to have programmatic access to the data? Use SharePoint! SharePoint provides WebServices that give you access to just about everything you can think of (&lt;a href="http://msdn.microsoft.com/en-us/library/ms954015.aspx" mce_href="http://msdn.microsoft.com/en-us/library/ms954015.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms954015.aspx&lt;/a&gt;). For the purposes of this article I am going to use the Lists WebService to 1) get data from a list, 2) Add an item to the list and 3) Delete an item from the list. &lt;/p&gt;
&lt;p&gt;The first step is to add two service references to Sharepoint. The first is to the Lists WebService (http://server/_vti_bin/Lists.asmx), and the second is to the Views WebService (http://server/_vti_bin/Views.asmx). Before you go and add the services references you need to ensure you have permissions to the service. You do this by putting the url to the asmx in the browser and adding "?WSDL" to the end. If you get a blank html page then you do NOT have permissions to that service, well at least for that node. In my environment I only have permissions to a sub site in SharePoint. To that end I had to point directly to the WebService for the SharePoint site that I have access to. For example the address that I have to use is (http://server/site1/subsite2/subsite3/subsite4/_vti_bin/Lists.asmx). So after you ensured you have the correct URL you can now add the service references to your project. Easy enough to do right click on the project in the solution explorer in VS.NET and select "Add Service Reference" (Note I am using VS.NET 2008). &lt;/p&gt;
&lt;p&gt;Now that you have your 2 service references you need to check your WCF configuration in the app/web config file. Due to my environment I had to set it to the following: &lt;/p&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;1: &lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;security&lt;/span&gt; &lt;span class="attr"&gt;mode&lt;/span&gt;&lt;span class="kwrd"&gt;="TransportCredentialOnly"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;2: &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;transport&lt;/span&gt; &lt;span class="attr"&gt;clientCredentialType&lt;/span&gt;&lt;span class="kwrd"&gt;="Ntlm"&lt;/span&gt; &lt;span class="attr"&gt;proxyCredentialType&lt;/span&gt;&lt;span class="kwrd"&gt;="None"&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;3: &lt;/span&gt;        &lt;span class="attr"&gt;realm&lt;/span&gt;&lt;span class="kwrd"&gt;=""&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;4: &lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;message&lt;/span&gt; &lt;span class="attr"&gt;clientCredentialType&lt;/span&gt;&lt;span class="kwrd"&gt;="UserName"&lt;/span&gt; &lt;span class="attr"&gt;algorithmSuite&lt;/span&gt;&lt;span class="kwrd"&gt;="Default"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;5: &lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;security&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The next step is to get the ID’s for the List and View that you want to pull the data for. The code below converts the name or title of the list/view into the ID. From what I read it is recommended that you use the ID’s however passing in the name to the web methods will work in most cases. &lt;/p&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;1: &lt;/span&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; GetListID(&lt;span class="kwrd"&gt;string&lt;/span&gt; listName)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;2: &lt;/span&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;3: &lt;/span&gt;            &lt;span class="rem"&gt;//Find the list we want&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;4: &lt;/span&gt;            &lt;span class="kwrd"&gt;string&lt;/span&gt; listID = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;5: &lt;/span&gt;            ListsSoapClient ws = &lt;span class="kwrd"&gt;new&lt;/span&gt; ListsSoapClient();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;6: &lt;/span&gt;            &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;7: &lt;/span&gt;            {&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;8: &lt;/span&gt;                XDocument doc = XDocument.Parse(ws.GetListCollection().OuterXml);&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;9: &lt;/span&gt;                listID = (from x &lt;span class="kwrd"&gt;in&lt;/span&gt; doc.Elements().First().Elements()&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;10: &lt;/span&gt;                          &lt;span class="kwrd"&gt;where&lt;/span&gt; x.Attribute(&lt;span class="str"&gt;"Title"&lt;/span&gt;).Value.Equals(listName)&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;11: &lt;/span&gt;                          select x.Attribute(&lt;span class="str"&gt;"ID"&lt;/span&gt;).Value).FirstOrDefault();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;12: &lt;/span&gt;            }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;13: &lt;/span&gt;            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (TimeoutException timeout)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;14: &lt;/span&gt;            {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;15: &lt;/span&gt;                &lt;span class="rem"&gt;//Handle the timeout exception.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;16: &lt;/span&gt;                ws.Abort();&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;17: &lt;/span&gt;            }&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;18: &lt;/span&gt;            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (CommunicationException commException)&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;19: &lt;/span&gt;            {&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;20: &lt;/span&gt;                &lt;span class="rem"&gt;// Handle the communication exception.&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;21: &lt;/span&gt;                ws.Abort();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;22: &lt;/span&gt;            }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;23: &lt;/span&gt; &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;24: &lt;/span&gt;            Console.WriteLine(&lt;span class="str"&gt;"\n\nI found that List '{0}' has ID '{1}'"&lt;/span&gt;, listName, listID);&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;25: &lt;/span&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; listID;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;26: &lt;/span&gt;        }&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;1: &lt;/span&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; GetViewID(&lt;span class="kwrd"&gt;string&lt;/span&gt; viewName, &lt;span class="kwrd"&gt;string&lt;/span&gt; listID)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;2: &lt;/span&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;3: &lt;/span&gt;            &lt;span class="rem"&gt;//Find the view we want&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;4: &lt;/span&gt;            &lt;span class="kwrd"&gt;string&lt;/span&gt; viewID = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;5: &lt;/span&gt;            ViewsSoapClient ws = &lt;span class="kwrd"&gt;new&lt;/span&gt; ViewsSoapClient();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;6: &lt;/span&gt;            &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;7: &lt;/span&gt;            {&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;8: &lt;/span&gt;                XDocument doc = XDocument.Parse(ws.GetViewCollection(listID).OuterXml);&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;9: &lt;/span&gt;                viewID = (from x &lt;span class="kwrd"&gt;in&lt;/span&gt; doc.Elements().First().Elements()&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;10: &lt;/span&gt;                          &lt;span class="kwrd"&gt;where&lt;/span&gt; x.Attribute(&lt;span class="str"&gt;"DisplayName"&lt;/span&gt;).Value.Equals(viewName)&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;11: &lt;/span&gt;                          select x.Attribute(&lt;span class="str"&gt;"Name"&lt;/span&gt;).Value).FirstOrDefault();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;12: &lt;/span&gt; &lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;13: &lt;/span&gt;            }&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;14: &lt;/span&gt;            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (TimeoutException timeout)&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;15: &lt;/span&gt;            {&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;16: &lt;/span&gt;                &lt;span class="rem"&gt;// Handle the timeout exception.&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;17: &lt;/span&gt;                ws.Abort();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;18: &lt;/span&gt;            }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;19: &lt;/span&gt;            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (CommunicationException commException)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;20: &lt;/span&gt;            {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;21: &lt;/span&gt;                &lt;span class="rem"&gt;//Handle the communication exception.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;22: &lt;/span&gt;                ws.Abort();&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;23: &lt;/span&gt;            }&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;24: &lt;/span&gt; &lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;25: &lt;/span&gt;            Console.WriteLine(&lt;span class="str"&gt;"\n\nI found that View '{0}' has ID '{1}'"&lt;/span&gt;, viewName, viewID);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;26: &lt;/span&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; viewID;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;27: &lt;/span&gt;        }&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;With all the plumbing out of the way I can now call the service to retrieve all the data in my list. &lt;/p&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; XDocument GetListData(&lt;span class="kwrd"&gt;string&lt;/span&gt; listID, &lt;span class="kwrd"&gt;string&lt;/span&gt; viewID)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;            XDocument list_data = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;            ListsSoapClient ws = &lt;span class="kwrd"&gt;new&lt;/span&gt; ListsSoapClient();&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;            &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;            {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;                list_data = XDocument.Parse(ws.GetListItems(listID, viewID, &lt;span class="kwrd"&gt;null&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt;, &lt;span class="kwrd"&gt;null&lt;/span&gt;).OuterXml);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;                var q = (from x &lt;span class="kwrd"&gt;in&lt;/span&gt; list_data.Elements().First().Elements().First().Elements()&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;                         select &lt;span class="kwrd"&gt;new&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;                         {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;                             Title = x.Attribute(&lt;span class="str"&gt;"ows_LinkTitle"&lt;/span&gt;).Value,&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;                             Field1 = x.Attribute(&lt;span class="str"&gt;"ows_Field1"&lt;/span&gt;).Value,&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;                             Field2 = x.Attribute(&lt;span class="str"&gt;"ows_Field2"&lt;/span&gt;).Value&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;                         });&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt; &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;                Console.WriteLine(&lt;span class="str"&gt;"\n\nThe List has the following items"&lt;/span&gt;);&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;                &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var r &lt;span class="kwrd"&gt;in&lt;/span&gt; q.ToList())&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;                {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;                    Console.WriteLine(&lt;span class="str"&gt;"{0}\t{1}\t{2}"&lt;/span&gt;, r.Title, r.Field1, r.Field2);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;                }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;            }&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (TimeoutException timeout)&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;            {&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;                &lt;span class="rem"&gt;// Handle the timeout exception.&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;                ws.Abort();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;            }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (CommunicationException commException)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;            {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;                &lt;span class="rem"&gt;// Handle the communication exception.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;                ws.Abort();&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;            }&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  32:  &lt;/span&gt; &lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  33:  &lt;/span&gt;            &lt;span class="kwrd"&gt;return&lt;/span&gt; list_data;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  34:  &lt;/span&gt;        }&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I can also Add an item to the list: &lt;/p&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; AddListItem(&lt;span class="kwrd"&gt;string&lt;/span&gt; listID)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;            &lt;span class="rem"&gt;//Add List Item&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;            XElement new_item = &lt;span class="kwrd"&gt;new&lt;/span&gt; XElement(&lt;span class="str"&gt;"Batch"&lt;/span&gt;,&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;                &lt;span class="kwrd"&gt;new&lt;/span&gt; XAttribute(&lt;span class="str"&gt;"OnError"&lt;/span&gt;, &lt;span class="str"&gt;"Continue"&lt;/span&gt;),&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;                &lt;span class="kwrd"&gt;new&lt;/span&gt; XAttribute(&lt;span class="str"&gt;"ListVersion"&lt;/span&gt;, &lt;span class="str"&gt;"1"&lt;/span&gt;),&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;                &lt;span class="kwrd"&gt;new&lt;/span&gt; XElement(&lt;span class="str"&gt;"Method"&lt;/span&gt;,&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;new&lt;/span&gt; XAttribute(&lt;span class="str"&gt;"ID"&lt;/span&gt;, &lt;span class="str"&gt;"1"&lt;/span&gt;),&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;new&lt;/span&gt; XAttribute(&lt;span class="str"&gt;"Cmd"&lt;/span&gt;, &lt;span class="str"&gt;"New"&lt;/span&gt;),&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;new&lt;/span&gt; XElement(&lt;span class="str"&gt;"Field"&lt;/span&gt;,&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;                        &lt;span class="kwrd"&gt;new&lt;/span&gt; XAttribute(&lt;span class="str"&gt;"Name"&lt;/span&gt;, &lt;span class="str"&gt;"Title"&lt;/span&gt;),&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;                        &lt;span class="str"&gt;"New Title"&lt;/span&gt;),&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;new&lt;/span&gt; XElement(&lt;span class="str"&gt;"Field"&lt;/span&gt;,&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;                        &lt;span class="kwrd"&gt;new&lt;/span&gt; XAttribute(&lt;span class="str"&gt;"Name"&lt;/span&gt;, &lt;span class="str"&gt;"Field1"&lt;/span&gt;),&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;                        &lt;span class="str"&gt;"new field 1"&lt;/span&gt;),&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;                    &lt;span class="kwrd"&gt;new&lt;/span&gt; XElement(&lt;span class="str"&gt;"Field"&lt;/span&gt;,&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;                        &lt;span class="kwrd"&gt;new&lt;/span&gt; XAttribute(&lt;span class="str"&gt;"Name"&lt;/span&gt;, &lt;span class="str"&gt;"Field2"&lt;/span&gt;),&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;                        &lt;span class="str"&gt;"new field 2"&lt;/span&gt;)));&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt; &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;            ListsSoapClient ws = &lt;span class="kwrd"&gt;new&lt;/span&gt; ListsSoapClient();&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;            &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;            {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;                Console.WriteLine(&lt;span class="str"&gt;"\n\nAdding Item to the list . . ."&lt;/span&gt;);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;                Console.WriteLine(ws.UpdateListItems(listID, new_item.GetXmlElement()).OuterXml);&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;            }&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (TimeoutException timeout)&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;            {&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;                &lt;span class="rem"&gt;// Handle the timeout exception.&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;                ws.Abort();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  30:  &lt;/span&gt;            }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  31:  &lt;/span&gt;            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (CommunicationException commException)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  32:  &lt;/span&gt;            {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  33:  &lt;/span&gt;                &lt;span class="rem"&gt;// Handle the communication exception.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  34:  &lt;/span&gt;                ws.Abort();&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  35:  &lt;/span&gt;            }&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  36:  &lt;/span&gt;        }&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;And delete an item from the list: &lt;/p&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;        &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; DeleteListItem(&lt;span class="kwrd"&gt;string&lt;/span&gt; listID, &lt;span class="kwrd"&gt;string&lt;/span&gt; item_id)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;            ListsSoapClient ws = &lt;span class="kwrd"&gt;new&lt;/span&gt; ListsSoapClient();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;            &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;            {&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;                XElement delete_item = &lt;span class="kwrd"&gt;new&lt;/span&gt; XElement(&lt;span class="str"&gt;"Batch"&lt;/span&gt;,&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;                        &lt;span class="kwrd"&gt;new&lt;/span&gt; XAttribute(&lt;span class="str"&gt;"OnError"&lt;/span&gt;, &lt;span class="str"&gt;"Continue"&lt;/span&gt;),&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;                        &lt;span class="kwrd"&gt;new&lt;/span&gt; XAttribute(&lt;span class="str"&gt;"ListVersion"&lt;/span&gt;, &lt;span class="str"&gt;"1"&lt;/span&gt;),&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;                        &lt;span class="kwrd"&gt;new&lt;/span&gt; XElement(&lt;span class="str"&gt;"Method"&lt;/span&gt;,&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;                            &lt;span class="kwrd"&gt;new&lt;/span&gt; XAttribute(&lt;span class="str"&gt;"ID"&lt;/span&gt;, &lt;span class="str"&gt;"1"&lt;/span&gt;),&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;                            &lt;span class="kwrd"&gt;new&lt;/span&gt; XAttribute(&lt;span class="str"&gt;"Cmd"&lt;/span&gt;, &lt;span class="str"&gt;"Delete"&lt;/span&gt;),&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;                            &lt;span class="kwrd"&gt;new&lt;/span&gt; XElement(&lt;span class="str"&gt;"Field"&lt;/span&gt;,&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;                                &lt;span class="kwrd"&gt;new&lt;/span&gt; XAttribute(&lt;span class="str"&gt;"Name"&lt;/span&gt;, &lt;span class="str"&gt;"ID"&lt;/span&gt;),&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;                                item_id)));&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt; &lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;                Console.WriteLine(&lt;span class="str"&gt;"\n\nDeleting Item to the list . . ."&lt;/span&gt;);&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;                Console.WriteLine(ws.UpdateListItems(listID, delete_item.GetXmlElement()).OuterXml);&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;            }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (TimeoutException timeout)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;            {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;                &lt;span class="rem"&gt;// Handle the timeout exception.&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;                ws.Abort();&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;            }&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (CommunicationException commException)&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;            {&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;                &lt;span class="rem"&gt;// Handle the communication exception.&lt;/span&gt;&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;                ws.Abort();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;            }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;        }&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;BTW the web service takes a XmlElement but I like working with the new XElement better. I altered an extension method &lt;a href="http://blogs.msdn.com/ericwhite/archive/2008/12/22/convert-xelement-to-xmlnode-and-convert-xmlnode-to-xelement.aspx" mce_href="http://blogs.msdn.com/ericwhite/archive/2008/12/22/convert-xelement-to-xmlnode-and-convert-xmlnode-to-xelement.aspx"&gt;Eric White&lt;/a&gt; wrote that does the conversion. &lt;/p&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;
&lt;div class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;        &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; XmlElement GetXmlElement(&lt;span class="kwrd"&gt;this&lt;/span&gt; XElement element)&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;        {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;            &lt;span class="kwrd"&gt;using&lt;/span&gt; (XmlReader xmlReader = element.CreateReader())&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;            {&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;                XmlDocument xmlDoc = &lt;span class="kwrd"&gt;new&lt;/span&gt; XmlDocument();&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;                xmlDoc.Load(xmlReader);&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;                &lt;span class="kwrd"&gt;return&lt;/span&gt; xmlDoc.FirstChild &lt;span class="kwrd"&gt;as&lt;/span&gt; XmlElement;&lt;/pre&gt;&lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;            }&lt;/pre&gt;&lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;        }&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;There are a bunch of libraries out there to aid in this process. The one that has got me the most excited is LINQ to SharePoint &lt;a href="http://www.codeplex.com/LINQtoSharePoint" mce_href="http://www.codeplex.com/LINQtoSharePoint"&gt;http://www.codeplex.com/LINQtoSharePoint&lt;/a&gt;. &lt;/p&gt;&lt;img src="http://www.drowningintechnicaldebt.com/ShawnWeisfeld/aggbug/279.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sweisfeld</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/02/24/sharepoint-webservice-are-your-friend.aspx</guid>
            <pubDate>Wed, 25 Feb 2009 00:50:00 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/279.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/02/24/sharepoint-webservice-are-your-friend.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/commentRss/279.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/services/trackbacks/279.aspx</trackback:ping>
        </item>
        <item>
            <title>Ramp Up</title>
            <link>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/01/06/ramp-up.aspx</link>
            <description>&lt;p mce_keep="true"&gt;Microsoft has started a new program called Ramp UP (&lt;a href="http://msdn.microsoft.com/en-us/rampup/default.aspx" mce_href="http://msdn.microsoft.com/en-us/rampup/default.aspx"&gt;http://msdn.microsoft.com/en-us/rampup/default.aspx&lt;/a&gt;). “Ramp Up is a free, online, community-based learning program, with a number of different tracks that will help you build your portfolio of professional development skills. Ramp Up has a solid foundation of premium technical content from subject-matter gurus, and provides easy-to-access content in a variety of forms that guide you in learning the important skills.”&lt;br /&gt;At this time they have 6 tracks. . . &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div mce_keep="true"&gt;SharePoint for Developers (Part 1)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div mce_keep="true"&gt;Visual Studio 2008&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div mce_keep="true"&gt;Aspiring Developer (migrating to VS 2005)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div mce_keep="true"&gt;Java Developer (migrating to VS 2005)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div mce_keep="true"&gt;VB 6.0 Developer (migrating to VS 2005)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div mce_keep="true"&gt;VS 2002/2003 Developer (migrating to VS 2005)&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p mce_keep="true"&gt;Check it out!&lt;br /&gt;&lt;/p&gt;&lt;img src="http://www.drowningintechnicaldebt.com/ShawnWeisfeld/aggbug/276.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>sweisfeld</dc:creator>
            <guid>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/01/06/ramp-up.aspx</guid>
            <pubDate>Tue, 06 Jan 2009 18:08:00 GMT</pubDate>
            <wfw:comment>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/276.aspx</wfw:comment>
            <comments>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/archive/2009/01/06/ramp-up.aspx#feedback</comments>
            <wfw:commentRss>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/comments/commentRss/276.aspx</wfw:commentRss>
            <trackback:ping>http://www.drowningintechnicaldebt.com/ShawnWeisfeld/services/trackbacks/276.aspx</trackback:ping>
        </item>
    </channel>
</rss>
