<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Easy Check If An SPWeb/SPList Exist</title>
	<atom:link href="http://whatsthesharepoint.com/2010/01/easy-check-if-an-spwebsplist-exist/feed/" rel="self" type="application/rss+xml" />
	<link>http://whatsthesharepoint.com/2010/01/easy-check-if-an-spwebsplist-exist/</link>
	<description>Another resource for MS SharePoint information.</description>
	<lastBuildDate>Thu, 15 Dec 2011 08:31:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Easy Check If An SPWeb/SPList Exist &#124; Hexanes!</title>
		<link>http://whatsthesharepoint.com/2010/01/easy-check-if-an-spwebsplist-exist/comment-page-1/#comment-975</link>
		<dc:creator>Easy Check If An SPWeb/SPList Exist &#124; Hexanes!</dc:creator>
		<pubDate>Thu, 28 Jul 2011 12:10:21 +0000</pubDate>
		<guid isPermaLink="false">http://whatsthesharepoint.com/?p=100#comment-975</guid>
		<description>[...] great post, one of those finer details of SharePoint API development that I use a lot as well: Easy Check If An SPWeb/SPList Exist   By David Petersen, January 20, 2010 2:57 [...]</description>
		<content:encoded><![CDATA[<p>[...] great post, one of those finer details of SharePoint API development that I use a lot as well: Easy Check If An SPWeb/SPList Exist   By David Petersen, January 20, 2010 2:57 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Petersen</title>
		<link>http://whatsthesharepoint.com/2010/01/easy-check-if-an-spwebsplist-exist/comment-page-1/#comment-656</link>
		<dc:creator>David Petersen</dc:creator>
		<pubDate>Tue, 24 May 2011 21:15:22 +0000</pubDate>
		<guid isPermaLink="false">http://whatsthesharepoint.com/?p=100#comment-656</guid>
		<description>Thank you everyone for commenting on this post.  I want to clarify a few things:

&lt;ol&gt;

		&lt;li&gt;These methods are only available if you reference System.Linq which is in .NET Framework 3.5. (Target framework: .NET Framework 3.5 from the Application, Project Properties).&lt;/li&gt;


		&lt;li&gt;As long as you are targeting .NET Framework 3.5 in your project, you can use these methods on WSS 3.0 based projects.&lt;/li&gt;

	&lt;li&gt;The way the lambda works is that is will iterate through the list until it finds a match or reaches the end.  This is not the most efficient way but with WSS 3.0, it is the cleanest way (IMHO) outside of trapping an error in a TryCatch block.&lt;/li&gt;

		&lt;li&gt;The &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistcollection.trygetlist.aspx&quot; rel=&quot;nofollow&quot;&gt;TryGetList()&lt;/a&gt; method is only available in SharePoint 2010.&lt;/li&gt;

&lt;/ol&gt;



Keep the comments coming.  I learn something new everyday!</description>
		<content:encoded><![CDATA[<p>Thank you everyone for commenting on this post.  I want to clarify a few things:</p>
<ol>
<li>These methods are only available if you reference System.Linq which is in .NET Framework 3.5. (Target framework: .NET Framework 3.5 from the Application, Project Properties).</li>
<li>As long as you are targeting .NET Framework 3.5 in your project, you can use these methods on WSS 3.0 based projects.</li>
<li>The way the lambda works is that is will iterate through the list until it finds a match or reaches the end.  This is not the most efficient way but with WSS 3.0, it is the cleanest way (IMHO) outside of trapping an error in a TryCatch block.</li>
<li>The <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistcollection.trygetlist.aspx" rel="nofollow">TryGetList()</a> method is only available in SharePoint 2010.</li>
</ol>
<p>Keep the comments coming.  I learn something new everyday!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon</title>
		<link>http://whatsthesharepoint.com/2010/01/easy-check-if-an-spwebsplist-exist/comment-page-1/#comment-651</link>
		<dc:creator>Simon</dc:creator>
		<pubDate>Fri, 13 May 2011 09:51:24 +0000</pubDate>
		<guid isPermaLink="false">http://whatsthesharepoint.com/?p=100#comment-651</guid>
		<description>These methods are not very efficient if there are a large number of lists/webs, because all of them are iterated.

To check if a list exists, better use the TryGetList() approach:

return web.Lists.TryGetList(listName) != null</description>
		<content:encoded><![CDATA[<p>These methods are not very efficient if there are a large number of lists/webs, because all of them are iterated.</p>
<p>To check if a list exists, better use the TryGetList() approach:</p>
<p>return web.Lists.TryGetList(listName) != null</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarika</title>
		<link>http://whatsthesharepoint.com/2010/01/easy-check-if-an-spwebsplist-exist/comment-page-1/#comment-183</link>
		<dc:creator>Sarika</dc:creator>
		<pubDate>Wed, 20 Oct 2010 06:58:39 +0000</pubDate>
		<guid isPermaLink="false">http://whatsthesharepoint.com/?p=100#comment-183</guid>
		<description>Thanks a lot</description>
		<content:encoded><![CDATA[<p>Thanks a lot</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sameer</title>
		<link>http://whatsthesharepoint.com/2010/01/easy-check-if-an-spwebsplist-exist/comment-page-1/#comment-174</link>
		<dc:creator>sameer</dc:creator>
		<pubDate>Mon, 20 Sep 2010 08:08:16 +0000</pubDate>
		<guid isPermaLink="false">http://whatsthesharepoint.com/?p=100#comment-174</guid>
		<description>Nice blog! Thanks for sharing!</description>
		<content:encoded><![CDATA[<p>Nice blog! Thanks for sharing!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joen Zhang</title>
		<link>http://whatsthesharepoint.com/2010/01/easy-check-if-an-spwebsplist-exist/comment-page-1/#comment-171</link>
		<dc:creator>Joen Zhang</dc:creator>
		<pubDate>Sun, 22 Aug 2010 08:27:07 +0000</pubDate>
		<guid isPermaLink="false">http://whatsthesharepoint.com/?p=100#comment-171</guid>
		<description>We can check if webName is existing SPWebCollection.Names.
So i often use a extension method for SPWebCollection:
    public static class SPWebCollectionExtension
    {
        public static Boolean Contains(this SPWebCollection webCollection, String webName)
        {
            if (webCollection == null) throw new ArgumentNullException(&quot;webCollection&quot;);
            if (String.IsNullOrEmpty(webName)) throw new ArgumentException(&quot;webName&quot;);
            return Array.Exists(webCollection.Names, s =&gt; s.Equals(webName, StringComparison.CurrentCultureIgnoreCase));
        }
    }</description>
		<content:encoded><![CDATA[<p>We can check if webName is existing SPWebCollection.Names.<br />
So i often use a extension method for SPWebCollection:<br />
    public static class SPWebCollectionExtension<br />
    {<br />
        public static Boolean Contains(this SPWebCollection webCollection, String webName)<br />
        {<br />
            if (webCollection == null) throw new ArgumentNullException(&#8220;webCollection&#8221;);<br />
            if (String.IsNullOrEmpty(webName)) throw new ArgumentException(&#8220;webName&#8221;);<br />
            return Array.Exists(webCollection.Names, s =&gt; s.Equals(webName, StringComparison.CurrentCultureIgnoreCase));<br />
        }<br />
    }</p>
]]></content:encoded>
	</item>
</channel>
</rss>

