<?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: Comparing String to Integer Conversion Methods in VB.NET</title>
	<atom:link href="http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/feed/" rel="self" type="application/rss+xml" />
	<link>http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/</link>
	<description>Articles on VB.NET and Software Development Team Leadership</description>
	<pubDate>Mon, 21 May 2012 19:01:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: victor</title>
		<link>http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/comment-page-1/#comment-1420</link>
		<dc:creator>victor</dc:creator>
		<pubDate>Fri, 23 Oct 2009 11:34:11 +0000</pubDate>
		<guid isPermaLink="false">http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/#comment-1420</guid>
		<description>What about the Ctype(MyString,Integer) metho?</description>
		<content:encoded><![CDATA[<p>What about the Ctype(MyString,Integer) metho?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: victor</title>
		<link>http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/comment-page-1/#comment-1412</link>
		<dc:creator>victor</dc:creator>
		<pubDate>Sat, 10 Oct 2009 00:32:47 +0000</pubDate>
		<guid isPermaLink="false">http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/#comment-1412</guid>
		<description>what if I code:

Dim i as Integer
i=TextBox1.Text

the code works fine though there is no explicit conversion from 
string to integer</description>
		<content:encoded><![CDATA[<p>what if I code:</p>
<p>Dim i as Integer<br />
i=TextBox1.Text</p>
<p>the code works fine though there is no explicit conversion from<br />
string to integer</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Wininger</title>
		<link>http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/comment-page-1/#comment-1286</link>
		<dc:creator>Chris Wininger</dc:creator>
		<pubDate>Tue, 06 Jan 2009 21:41:13 +0000</pubDate>
		<guid isPermaLink="false">http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/#comment-1286</guid>
		<description>Chandrashechar, you have a line that says

cmd.Parameters.Add(”@Scode”, OleDbType.VarChar).Value = txtSCode

Is the txtSCode a reference to a TextBox object.  If it is then you need to do txtSCode.Text.</description>
		<content:encoded><![CDATA[<p>Chandrashechar, you have a line that says</p>
<p>cmd.Parameters.Add(”@Scode”, OleDbType.VarChar).Value = txtSCode</p>
<p>Is the txtSCode a reference to a TextBox object.  If it is then you need to do txtSCode.Text.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Chan</title>
		<link>http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/comment-page-1/#comment-1190</link>
		<dc:creator>John Chan</dc:creator>
		<pubDate>Wed, 27 Aug 2008 08:57:26 +0000</pubDate>
		<guid isPermaLink="false">http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/#comment-1190</guid>
		<description>Hi, this is exactly what I'm looking for.  Just would like to know how you came up with the performance figures.  I once tried to replace all my Convert.ToInt32 with TryParse but my profiler told me they performed the same so I just gave that up. Thx again for the great article.</description>
		<content:encoded><![CDATA[<p>Hi, this is exactly what I&#8217;m looking for.  Just would like to know how you came up with the performance figures.  I once tried to replace all my Convert.ToInt32 with TryParse but my profiler told me they performed the same so I just gave that up. Thx again for the great article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hax Or</title>
		<link>http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/comment-page-1/#comment-1142</link>
		<dc:creator>Hax Or</dc:creator>
		<pubDate>Mon, 23 Jun 2008 19:31:08 +0000</pubDate>
		<guid isPermaLink="false">http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/#comment-1142</guid>
		<description>Don't they teach you anything over there, Chandrashekhar?  Try experts exchange if you need help.

This blog article is for experienced programmers who want to know the 'best rating' for converting strings to integers.</description>
		<content:encoded><![CDATA[<p>Don&#8217;t they teach you anything over there, Chandrashekhar?  Try experts exchange if you need help.</p>
<p>This blog article is for experienced programmers who want to know the &#8216;best rating&#8217; for converting strings to integers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chandrashekhar Patil</title>
		<link>http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/comment-page-1/#comment-1097</link>
		<dc:creator>Chandrashekhar Patil</dc:creator>
		<pubDate>Sat, 26 Apr 2008 07:08:48 +0000</pubDate>
		<guid isPermaLink="false">http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/#comment-1097</guid>
		<description>Dear Sir,
Whem I am  saving data into database with follwoing coding, I am getting  error as like "Failed to convert parameter value from a TextBox to a String."

Kindly suggest how to solve this problem.

See Following Coding :

 cmd = New OleDbCommand(M_StrAdd, StrConn)
        cmd.Parameters.Add("@Recno", OleDbType.Integer).Value = Convert.ToInt32(TxtRecno.Text)
        cmd.Parameters.Add("@Scode", OleDbType.VarChar).Value = txtSCode
        cmd.Parameters.Add("@Sname", OleDbType.VarChar).Value = TxtStudentName.Text
        cmd.ExecuteNonQuery()
        cmd.Dispose()</description>
		<content:encoded><![CDATA[<p>Dear Sir,<br />
Whem I am  saving data into database with follwoing coding, I am getting  error as like &#8220;Failed to convert parameter value from a TextBox to a String.&#8221;</p>
<p>Kindly suggest how to solve this problem.</p>
<p>See Following Coding :</p>
<p> cmd = New OleDbCommand(M_StrAdd, StrConn)<br />
        cmd.Parameters.Add(&#8221;@Recno&#8221;, OleDbType.Integer).Value = Convert.ToInt32(TxtRecno.Text)<br />
        cmd.Parameters.Add(&#8221;@Scode&#8221;, OleDbType.VarChar).Value = txtSCode<br />
        cmd.Parameters.Add(&#8221;@Sname&#8221;, OleDbType.VarChar).Value = TxtStudentName.Text<br />
        cmd.ExecuteNonQuery()<br />
        cmd.Dispose()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jfrankcarr</title>
		<link>http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/comment-page-1/#comment-461</link>
		<dc:creator>jfrankcarr</dc:creator>
		<pubDate>Tue, 18 Sep 2007 13:39:38 +0000</pubDate>
		<guid isPermaLink="false">http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/#comment-461</guid>
		<description>Thanks for your comment Ballamber

You could use a regular expression to extract the numeric string and convert that string to an integer using TryParse. Of course, that isn't quite as simple as just using Val() but it might be more 'acceptable' in polite .NET company.

I do strongly recommend that if you use Val that you have Option Strict turned on. You should do that anyway but since Val will force conversions of just about anything this is an extra safety step you should take.</description>
		<content:encoded><![CDATA[<p>Thanks for your comment Ballamber</p>
<p>You could use a regular expression to extract the numeric string and convert that string to an integer using TryParse. Of course, that isn&#8217;t quite as simple as just using Val() but it might be more &#8216;acceptable&#8217; in polite .NET company.</p>
<p>I do strongly recommend that if you use Val that you have Option Strict turned on. You should do that anyway but since Val will force conversions of just about anything this is an extra safety step you should take.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ballamber</title>
		<link>http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/comment-page-1/#comment-453</link>
		<dc:creator>Ballamber</dc:creator>
		<pubDate>Tue, 18 Sep 2007 09:43:18 +0000</pubDate>
		<guid isPermaLink="false">http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/#comment-453</guid>
		<description>Thanks for this article, it was quite useful. I ended up using Val for it's simplicity of gracefully stopping at the first non-numerical character. Was pretty useful when converting HTML width parameters to integers. E.g. "200px" easily converts to 200 while the other functions would fail. (I did not thoroughly tested it though.)

Can any of the other functions be used to do the same without adding extra code?</description>
		<content:encoded><![CDATA[<p>Thanks for this article, it was quite useful. I ended up using Val for it&#8217;s simplicity of gracefully stopping at the first non-numerical character. Was pretty useful when converting HTML width parameters to integers. E.g. &#8220;200px&#8221; easily converts to 200 while the other functions would fail. (I did not thoroughly tested it though.)</p>
<p>Can any of the other functions be used to do the same without adding extra code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2007-09-15 &#171; D e j a m e S e r</title>
		<link>http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/comment-page-1/#comment-347</link>
		<dc:creator>links for 2007-09-15 &#171; D e j a m e S e r</dc:creator>
		<pubDate>Sat, 15 Sep 2007 15:20:46 +0000</pubDate>
		<guid isPermaLink="false">http://vbnotebookfor.net/2007/09/14/comparing-string-to-integer-conversion-methods-in-vbnet/#comment-347</guid>
		<description>[...] Comparing String to Integer Conversion Methods in VB.NET (tags: dotnet) [...]</description>
		<content:encoded><![CDATA[<p>[...] Comparing String to Integer Conversion Methods in VB.NET (tags: dotnet) [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

