<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Furo&#039;s World &#187; exception</title>
	<atom:link href="http://www.furo.fr/tag/exception/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.furo.fr</link>
	<description>Welcome to my piece of web!</description>
	<lastBuildDate>Fri, 15 Jul 2011 08:59:33 +0000</lastBuildDate>
	<language>fr</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>&#8220;Cannot obtain value of local or argument&#8221; &#8220;as it is not available at this instruction pointer, possibly because it has been optimized away.&#8221;</title>
		<link>http://www.furo.fr/2008/05/08/cannot-obtain-value-of-local-or-argument-as-it-is-not-available-at-this-instruction-pointer-possibly-because-it-has-been-optimized-away/</link>
		<comments>http://www.furo.fr/2008/05/08/cannot-obtain-value-of-local-or-argument-as-it-is-not-available-at-this-instruction-pointer-possibly-because-it-has-been-optimized-away/#comments</comments>
		<pubDate>Thu, 08 May 2008 17:27:16 +0000</pubDate>
		<dc:creator>Flotueur</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[exception]]></category>

		<guid isPermaLink="false">http://www.furo.fr/?p=24</guid>
		<description><![CDATA[Welcome in the weird world of C#! Sometimes you say: &#8220;Programming is simply, if you know how things work then you can debug or fix every problems!&#8221;. But when something not understandable happens, well&#8230; you just have your eyes to cry! In my case I was doing a small part of code, following a tutorial. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-18 alignleft" style="margin: 10px; float: left;" title="Logo .NET" src="http://www.furo.fr/wp-content/200px-visual_basic_net_logo1.jpg" alt="" width="141" height="76" />Welcome in the weird world of <strong>C#</strong>! Sometimes you say: &#8220;Programming is simply, if you know <strong>how things work</strong> then you can debug or fix every problems!&#8221;. But when something <strong>not understandable</strong> happens, well&#8230; you just have your eyes to cry!</p>
<p>In my case I was doing a small part of code, following a tutorial. Everything was crystal clear. But at the execution, this error happened:</p>
<blockquote><p><strong><code>Cannot obtain value of local or argument XXXXX as it is not available at this instruction pointer, possibly because it has been optimized away.</code></strong></p></blockquote>
<p>So I began to search, and it was honestly the first time that the Microsoft search engine gave me <strong>more answer</strong> than Google! And what a surprise when I discovered that all the occurrence found were people that had this problem and that the problem was <strong>completely different from mine</strong>. Going further, I discovered that in the most cases, having this exception is <strong>a known problem of the framework</strong>: I couldn&#8217;t do nothing about it.</p>
<p>So basicaly, it is a <strong>weakness in the .NET 2.0 framework</strong>. Don&#8217;t ask me more, people from who i got the intell didn&#8217;t knew much more. but since my speciality is to be stubborn I tried a few things and found something that could interest you if you are in the same case.</p>
<p>In fact, when you execute the line of code that returns this exception, <strong>it is like </strong>it is executed 2 times so a solution is to surround your code by this:</p>
<blockquote><p><code>Try{<br />
Your_expression;<br />
}<br />
catch{Exception}</code></p></blockquote>
<p>Your expression will be evaluated and will return the exception but with no effect. Ok, it is <strong>quick and dirty</strong> but it works, and can help you if like me, you don&#8217;t have a choice.</p>
<p>If you have any feedback about that issue, <strong>please leave a comment</strong>!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.furo.fr/2008/05/08/cannot-obtain-value-of-local-or-argument-as-it-is-not-available-at-this-instruction-pointer-possibly-because-it-has-been-optimized-away/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

