<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" media="screen" href="/App_Themes/default/rss.xslt"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" 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:media="http://search.yahoo.com/mrss/" xmlns:evnet="http://www.mscommunities.com/rssmodule/"><channel><title>Comment Feed for Mike Barnett - Getting started with Code Contracts in Visual Studio 2008 (Peli on Channel 9)</title><atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/posts/peli/getting-started-with-code-contracts-in-visual-studio-2008/rss/default.aspx" /><image><url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url><title>Comment Feed for Mike Barnett - Getting started with Code Contracts in Visual Studio 2008 (Peli on Channel 9)</title><link>http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/</link></image><description>Mike Barnett - Getting started with Code Contracts in Visual Studio 2008</description><link>http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/</link><language>en-us</language><pubDate>Tue, 03 Mar 2009 08:34:05 GMT</pubDate><lastBuildDate>Tue, 03 Mar 2009 08:34:05 GMT</lastBuildDate><generator>EvNet (EvNet, Version=1.0.3608.3122, Culture=neutral, PublicKeyToken=null)</generator><item><title>Re: Mike Barnett - Getting started with Code Contracts in Visual Studio 2008</title><description>aaaaw its only for vs team suite :( pleeeeese make a version for those of us not able to convice our managers to get TS? :) &lt;BR&gt;&lt;BR&gt;--edit--&lt;BR&gt;oh wait, there is one for pro as well :D&lt;BR&gt;(use the second link, not the devlabs one)</description><comments></comments><link>http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=459506</link><pubDate>Tue, 03 Mar 2009 08:31:16 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=459506</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/459506/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>aaaaw its only for vs team suite :( pleeeeese make a version for those of us not able to convice our managers to get TS? :) --edit--oh wait, there is one for pro as well :D(use the second link, not the devlabs one)</evnet:previewtext><dc:creator>Allan Lindqvist</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/459506/Trackback.aspx</trackback:ping></item><item><title>Re: Mike Barnett - Getting started with Code Contracts in Visual Studio 2008</title><description>Awesome to say the least!!&lt;BR&gt;&lt;BR&gt;Ensuring that your class is in a correct state would extremely cut back on how often you have to validate your code. &lt;BR&gt;&lt;BR&gt;I'm going to start using this right away.&lt;BR&gt;&lt;BR&gt;Does anyone know if I can use this with Windows Mobile development in Visual Studio?</description><comments></comments><link>http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=459483</link><pubDate>Tue, 03 Mar 2009 04:22:43 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=459483</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/459483/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Awesome to say the least!!Ensuring that your class is in a correct state would extremely cut back on how often you have to validate your code. I'm going to start using this right away.Does anyone know if I can use this with Windows Mobile development in Visual Studio?</evnet:previewtext><dc:creator>ChazB</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/459483/Trackback.aspx</trackback:ping></item><item><title>Re: Mike Barnett - Getting started with Code Contracts in Visual Studio 2008</title><description>woah... that awsome :O &lt;BR&gt;the static check in perticular is really cool :)&lt;BR&gt;&lt;BR&gt;is there a way to customise the runtime checks&amp;nbsp;a little more though? [i just watched the video so this might be obvious in practice]</description><comments></comments><link>http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=459453</link><pubDate>Tue, 03 Mar 2009 00:59:10 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=459453</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/459453/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>woah... that awsome :O the static check in perticular is really cool :)is there a way to customise the runtime checks&amp;nbsp;a little more though? [i just watched the video so this might be obvious in practice]</evnet:previewtext><dc:creator>Allan Lindqvist</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/459453/Trackback.aspx</trackback:ping></item><item><title>Re: Mike Barnett - Getting started with Code Contracts in Visual Studio 2008</title><description>Seems that I can soon throw my custom made post condition check snippets away!! Nice</description><comments></comments><link>http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458934</link><pubDate>Thu, 26 Feb 2009 19:00:24 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458934</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/458934/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Seems that I can soon throw my custom made post condition check snippets away!! Nice</evnet:previewtext><dc:creator>Chris Richner</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/458934/Trackback.aspx</trackback:ping></item><item><title>Re: Getting started with Code Contracts in Visual Studio 2008</title><description>I was really excited about contracts and invariants after watching the Spec# video a while ago. It is an absolute delight to find out that this will become part of the base class library, and I don't need to placate managers or developers to use contracts. Just a call to System.Diagnostics.Contracts will do the trick.&lt;br&gt;&lt;br&gt;Thank you for the demonstration, I have put aside all my free time to try this out.&lt;br&gt;</description><comments></comments><link>http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458734</link><pubDate>Wed, 25 Feb 2009 06:30:32 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458734</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/458734/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I was really excited about contracts and invariants after watching the Spec# video a while ago. It is an absolute delight to find out that this will become part of the base class library, and I don't need to placate managers or developers to use contracts. Just a call to System.Diagnostics.Contracts&amp;#8230;</evnet:previewtext><dc:creator>vesuvius</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/458734/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Getting started with Code Contracts in Visual Studio 2008</title><description>This is a fine place to ask, but in general we will be monitoring the forum more, so please use that for questions.&amp;nbsp;(&lt;A href="http://social.msdn.microsoft.com/Forums/en-US/codecontracts/threads/"&gt;http://social.msdn.microsoft.com/Forums/en-US/codecontracts/threads/&lt;/A&gt;) But yes, you can have preconditions on any method, not just constructors. In the video, we just ran out of time before we could write a method more complicated than ToInt() and since that one had no parameters, it didn't make any sense to put a precondition on it.&lt;BR&gt;&lt;BR&gt;Thanks!</description><comments></comments><link>http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458705</link><pubDate>Wed, 25 Feb 2009 02:20:21 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458705</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/458705/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>This is a fine place to ask, but in general we will be monitoring the forum more, so please use that for questions.&amp;nbsp;(http://social.msdn.microsoft.com/Forums/en-US/codecontracts/threads/) But yes, you can have preconditions on any method, not just constructors. In the video, we just ran out of&amp;#8230;</evnet:previewtext><dc:creator>mbarnett</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/458705/Trackback.aspx</trackback:ping></item><item><title>Re: Getting started with Code Contracts in Visual Studio 2008</title><description>I had one question about how to use the contract, and please let me know if this is not the right place to ask.&lt;BR&gt;Question I have is can the preconditions only go in the constructor?&amp;nbsp; It makes sense to me that this would be the case, but I figued I'd ask just in case.&amp;nbsp; I have a custom attribute where I need to check if a variable object inplements a specific interface, but the object is passed in a method and not in the constructor.&lt;BR&gt;&lt;BR&gt;Thanks,&lt;BR&gt;DoN</description><comments></comments><link>http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458664</link><pubDate>Tue, 24 Feb 2009 20:47:40 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458664</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/458664/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I had one question about how to use the contract, and please let me know if this is not the right place to ask.Question I have is can the preconditions only go in the constructor?&amp;nbsp; It makes sense to me that this would be the case, but I figued I'd ask just in case.&amp;nbsp; I have a custom&amp;#8230;</evnet:previewtext><dc:creator>Don Hansen</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/458664/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Getting started with Code Contracts in Visual Studio 2008</title><description>&lt;P&gt;There are several reasons to put the contracts into the code as opposed to using custom attributes. hillr's reply is definitely one of the big reasons. You can see our comments on this topic in our FAQ:&amp;nbsp;&lt;A href="http://msdn.microsoft.com/en-us/devlabs/dd492004.aspx"&gt;http://msdn.microsoft.com/en-us/devlabs/dd492004.aspx&lt;/A&gt;. &lt;/P&gt;</description><comments></comments><link>http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458652</link><pubDate>Tue, 24 Feb 2009 18:40:54 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458652</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/458652/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>There are several reasons to put the contracts into the code as opposed to using custom attributes. hillr's reply is definitely one of the big reasons. You can see our comments on this topic in our FAQ:&amp;nbsp;http://msdn.microsoft.com/en-us/devlabs/dd492004.aspx. </evnet:previewtext><dc:creator>mbarnett</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/458652/Trackback.aspx</trackback:ping></item><item><title>Re: Re: Getting started with Code Contracts in Visual Studio 2008</title><description>My guess is because any expressions (a == b || c != d)&amp;nbsp;you put in an attribute (as a string)&amp;nbsp;can't be verified by the compiler.&amp;nbsp;&amp;nbsp; Any errors wouldn't be noticed until runtime.</description><comments></comments><link>http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458594</link><pubDate>Tue, 24 Feb 2009 05:46:29 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458594</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/458594/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>My guess is because any expressions (a == b || c != d)&amp;nbsp;you put in an attribute (as a string)&amp;nbsp;can't be verified by the compiler.&amp;nbsp;&amp;nbsp; Any errors wouldn't be noticed until runtime.</evnet:previewtext><dc:creator>hillr</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/458594/Trackback.aspx</trackback:ping></item><item><title>Re: Getting started with Code Contracts in Visual Studio 2008</title><description>I watched the Spec# Expert to Expert vid with Erik Meijer a while back and it is pretty interesting stuff. Looking forward to this to see how far it has come.&lt;br&gt;</description><comments></comments><link>http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458587</link><pubDate>Tue, 24 Feb 2009 03:42:15 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458587</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/458587/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I watched the Spec# Expert to Expert vid with Erik Meijer a while back and it is pretty interesting stuff. Looking forward to this to see how far it has come.</evnet:previewtext><dc:creator>Sparky</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/458587/Trackback.aspx</trackback:ping></item><item><title>Re: Getting started with Code Contracts in Visual Studio 2008</title><description>Why put the contract into the method, as opposed to an attribute? How does this code rewriting work with the standard compiler?</description><comments></comments><link>http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458577</link><pubDate>Tue, 24 Feb 2009 01:37:18 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/posts/Peli/Getting-started-with-Code-Contracts-in-Visual-Studio-2008/?CommentID=458577</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/458577/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Why put the contract into the method, as opposed to an attribute? How does this code rewriting work with the standard compiler?</evnet:previewtext><dc:creator>Joshua Ross</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/458577/Trackback.aspx</trackback:ping></item></channel></rss>