<?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>Commentaires sur : Validation d&#8217;un IBAN en C#</title>
	<atom:link href="http://www.juliencarnelos.com/2007/09/26/validation-dun-iban-en-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.juliencarnelos.com/2007/09/26/validation-dun-iban-en-c/</link>
	<description>JEE , .NET , SOA , Conseil</description>
	<lastBuildDate>Wed, 30 Jun 2010 13:40:41 +0200</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Par : Albireo</title>
		<link>http://www.juliencarnelos.com/2007/09/26/validation-dun-iban-en-c/comment-page-1/#comment-614</link>
		<dc:creator>Albireo</dc:creator>
		<pubDate>Thu, 20 Nov 2008 10:31:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.juliencarnelos.com/2007/09/26/validation-dun-iban-en-c/#comment-614</guid>
		<description>Hi, thank you very much for your code, has saved my life from implementing a validation function from scratch... ^_^

I reformatted a bit your code to improve readability removing some variables and replaced the &lt;em&gt;for&lt;/em&gt; cycle with another foreach.

If the code below becomes messed up, I&#039;ve uploaded the snippet here: &lt;a href=&quot;http://pastebin.com/f7a76053f&quot; title=&quot;Look at the snippet on pastebin.com&quot;&gt;pastebin.com&lt;/a&gt;.

&lt;code&gt;public static bool ValidateIban(String Iban)
{
	StringBuilder sbCheck;
	Int32 intValue;
	Int32 intChecksum;
	
	Iban = Iban.Substring(4, Iban.Length - 4) + Iban.Substring(0, 4);
	
	sbCheck = new StringBuilder();
	
	foreach (Char cCharacter in Iban)
	{
		intValue = (Char.IsLetter(cCharacter)) ? (cCharacter - &#039;A&#039; + 10) : (cCharacter - &#039;0&#039;);
		
		sbCheck.Append(intValue);
	}
	
	intChecksum = Int32.Parse(sbCheck.ToString(0, 1));
	
	foreach (Char cCharacter in sbCheck.ToString(1, sbCheck.Length - 1))
	{
		intValue = Int32.Parse(cCharacter.ToString());
		
		intChecksum *= 10;
		intChecksum += intValue;
		intChecksum %= 97;
	}
	
	return (intChecksum == 1);
}&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hi, thank you very much for your code, has saved my life from implementing a validation function from scratch&#8230; ^_^</p>
<p>I reformatted a bit your code to improve readability removing some variables and replaced the <em>for</em> cycle with another foreach.</p>
<p>If the code below becomes messed up, I&#8217;ve uploaded the snippet here: <a href="http://pastebin.com/f7a76053f" title="Look at the snippet on pastebin.com">pastebin.com</a>.</p>
<p><code>public static bool ValidateIban(String Iban)<br />
{<br />
	StringBuilder sbCheck;<br />
	Int32 intValue;<br />
	Int32 intChecksum;</p>
<p>	Iban = Iban.Substring(4, Iban.Length - 4) + Iban.Substring(0, 4);</p>
<p>	sbCheck = new StringBuilder();</p>
<p>	foreach (Char cCharacter in Iban)<br />
	{<br />
		intValue = (Char.IsLetter(cCharacter)) ? (cCharacter - 'A' + 10) : (cCharacter - '0');</p>
<p>		sbCheck.Append(intValue);<br />
	}</p>
<p>	intChecksum = Int32.Parse(sbCheck.ToString(0, 1));</p>
<p>	foreach (Char cCharacter in sbCheck.ToString(1, sbCheck.Length - 1))<br />
	{<br />
		intValue = Int32.Parse(cCharacter.ToString());</p>
<p>		intChecksum *= 10;<br />
		intChecksum += intValue;<br />
		intChecksum %= 97;<br />
	}</p>
<p>	return (intChecksum == 1);<br />
}</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : Royale</title>
		<link>http://www.juliencarnelos.com/2007/09/26/validation-dun-iban-en-c/comment-page-1/#comment-515</link>
		<dc:creator>Royale</dc:creator>
		<pubDate>Wed, 26 Sep 2007 13:02:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.juliencarnelos.com/2007/09/26/validation-dun-iban-en-c/#comment-515</guid>
		<description>Moi j&#039;aurais pu te dire commencer valider une clef RIB en PL/SQL comme je l&#039;ai fais y a pas longtemps... Mais c&#039;est moins sexy ;-)</description>
		<content:encoded><![CDATA[<p>Moi j&#8217;aurais pu te dire commencer valider une clef RIB en PL/SQL comme je l&#8217;ai fais y a pas longtemps&#8230; Mais c&#8217;est moins sexy <img src='http://www.juliencarnelos.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

