<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://aspadvice.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">The Stark Zone</title><subtitle type="html">.Net/SQL bloggings from Stark</subtitle><id>http://aspadvice.com/blogs/gstark/atom.aspx</id><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/gstark/default.aspx" /><link rel="self" type="application/atom+xml" href="http://aspadvice.com/blogs/gstark/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.60809.935">Community Server</generator><updated>2005-02-10T19:26:00Z</updated><entry><title>Execute sqlcmd (oSql) from .NET and capture the output</title><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/gstark/archive/2006/09/14/Execute-sqlcmd-_2800_oSql_2900_-from-.NET-and-capture-the-output.aspx" /><id>http://aspadvice.com/blogs/gstark/archive/2006/09/14/Execute-sqlcmd-_2800_oSql_2900_-from-.NET-and-capture-the-output.aspx</id><published>2006-09-14T05:28:00Z</published><updated>2006-09-14T05:28:00Z</updated><content type="html">&lt;p&gt;I have recently seen quite a few questions about executing sqlcmd (oSql for those on 2000) from .NET code.&amp;nbsp; I have a bunch of utilities that i have written that do this and thought I would share the basic code to do it.&lt;/p&gt; &lt;p&gt;You can also easily capture the output as a stream and do whatever you want with it. In the example below I dump it to a file....I also use the -o to output the results of the sql that was excuted.&lt;br&gt;Just use the RedirectStandardOutput and RedirectStandardError&lt;br&gt;One caveat is to make sure you do the ReadToEnd before and after the waitforexit(). I had issues where it wouldn't complete and ended up just hanging if I didn't do that.&lt;br&gt;&lt;br&gt;&lt;/p&gt; &lt;p&gt;&lt;font color="#0000ff" size="2"&gt;using&lt;/font&gt;&lt;font size="2"&gt; (&lt;/font&gt;&lt;font color="#008080" size="2"&gt;Process&lt;/font&gt;&lt;font size="2"&gt; proc = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#008080" size="2"&gt;Process&lt;/font&gt;&lt;font size="2"&gt;())  &lt;p&gt;{&lt;/p&gt; &lt;p&gt;proc.StartInfo.FileName = @"""C:\Program Files\Microsoft SQL Server\90\Tools\Binn\SqlCmd.exe""";&lt;br&gt;proc.StartInfo.Arguments = @"-Uuser -Ppassword -S" + DestinationServer + " -d" + DestinationDatabase + @" -i""" + SqlToExecute+ @""" -o""" + OutSqlFileName + @"""";&lt;br&gt;proc.StartInfo.UseShellExecute = false;&lt;br&gt;proc.StartInfo.RedirectStandardOutput = true;&lt;br&gt;proc.StartInfo.RedirectStandardError = true;&lt;br&gt;proc.StartInfo.CreateNoWindow = true;&lt;br&gt;proc.Start();&lt;br&gt;System.IO.File.AppendAllText(OutFileName, proc.StandardOutput.ReadToEnd());&lt;br&gt;proc.WaitForExit();&lt;br&gt;System.IO.File.AppendAllText(OutFileName, proc.StandardOutput.ReadToEnd());&lt;br&gt;proc.Close(); &lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/p&gt; &lt;p&gt;Let me know if you have any questions or comments on this.&amp;nbsp; &lt;br&gt;&lt;/p&gt;&lt;/font&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/gstark/archive/2006/09/14/Execute-sqlcmd-_2800_oSql_2900_-from-.NET-and-capture-the-output.aspx&amp;amp;;subject=Execute+sqlcmd+(oSql)+from+.NET+and+capture+the+output" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2006/09/14/Execute-sqlcmd-_2800_oSql_2900_-from-.NET-and-capture-the-output.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/gstark/archive/2006/09/14/Execute-sqlcmd-_2800_oSql_2900_-from-.NET-and-capture-the-output.aspx&amp;amp;;title=Execute+sqlcmd+(oSql)+from+.NET+and+capture+the+output" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2006/09/14/Execute-sqlcmd-_2800_oSql_2900_-from-.NET-and-capture-the-output.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/gstark/archive/2006/09/14/Execute-sqlcmd-_2800_oSql_2900_-from-.NET-and-capture-the-output.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2006/09/14/Execute-sqlcmd-_2800_oSql_2900_-from-.NET-and-capture-the-output.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/gstark/archive/2006/09/14/Execute-sqlcmd-_2800_oSql_2900_-from-.NET-and-capture-the-output.aspx&amp;amp;title=Execute+sqlcmd+(oSql)+from+.NET+and+capture+the+output" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2006/09/14/Execute-sqlcmd-_2800_oSql_2900_-from-.NET-and-capture-the-output.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/gstark/archive/2006/09/14/Execute-sqlcmd-_2800_oSql_2900_-from-.NET-and-capture-the-output.aspx&amp;amp;;title=Execute+sqlcmd+(oSql)+from+.NET+and+capture+the+output" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2006/09/14/Execute-sqlcmd-_2800_oSql_2900_-from-.NET-and-capture-the-output.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/gstark/archive/2006/09/14/Execute-sqlcmd-_2800_oSql_2900_-from-.NET-and-capture-the-output.aspx&amp;amp;;title=Execute+sqlcmd+(oSql)+from+.NET+and+capture+the+output&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2006/09/14/Execute-sqlcmd-_2800_oSql_2900_-from-.NET-and-capture-the-output.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=22549" width="1" height="1"&gt;</content><author><name>gstark</name><uri>http://aspadvice.com/members/gstark.aspx</uri></author><category term="C#" scheme="http://aspadvice.com/blogs/gstark/archive/tags/C_2300_/default.aspx" /><category term="SQL Server" scheme="http://aspadvice.com/blogs/gstark/archive/tags/SQL+Server/default.aspx" /><category term="SqlCMD" scheme="http://aspadvice.com/blogs/gstark/archive/tags/SqlCMD/default.aspx" /></entry><entry><title>Messenger 7.5 Beta</title><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/gstark/archive/2005/08/25/2552.aspx" /><id>http://aspadvice.com/blogs/gstark/archive/2005/08/25/2552.aspx</id><published>2005-08-26T02:44:00Z</published><updated>2005-08-26T02:44:00Z</updated><content type="html">I downloaded the &lt;A href="http://download.microsoft.com/download/2/8/b/28be9d1b-7ced-4817-989c-e089792151b3/EN/Install_MSN_Messenger.exe"&gt;messenger 7.5 beta&lt;/A&gt; and found a &lt;A href="http://www.mess.be/pafiledb/pafiledb.php?action=download&amp;amp;id=637 "&gt;hack &lt;/A&gt;to get rid of the annoying ads that messenger puts out.&amp;nbsp;The new messenger has a slightly different look, but for the most part it is the same.&amp;nbsp; I am just happy to get rid of the ads.
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/gstark/archive/2005/08/25/2552.aspx&amp;amp;;subject=Messenger+7.5+Beta" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/08/25/2552.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/gstark/archive/2005/08/25/2552.aspx&amp;amp;;title=Messenger+7.5+Beta" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/08/25/2552.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/gstark/archive/2005/08/25/2552.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/08/25/2552.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/gstark/archive/2005/08/25/2552.aspx&amp;amp;title=Messenger+7.5+Beta" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/08/25/2552.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/gstark/archive/2005/08/25/2552.aspx&amp;amp;;title=Messenger+7.5+Beta" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/08/25/2552.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/gstark/archive/2005/08/25/2552.aspx&amp;amp;;title=Messenger+7.5+Beta&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/08/25/2552.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2552" width="1" height="1"&gt;</content><author><name>gstark</name><uri>http://aspadvice.com/members/gstark.aspx</uri></author></entry><entry><title>SQL Renumbering</title><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/gstark/archive/2005/03/09/2551.aspx" /><id>http://aspadvice.com/blogs/gstark/archive/2005/03/09/2551.aspx</id><published>2005-03-10T03:04:00Z</published><updated>2005-03-10T03:04:00Z</updated><content type="html">&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I recently had a need to allow users to order all of their different phone numbers.&amp;nbsp; I wanted to make it simple and just provide a text box so the user can type in whatever priority they want the phone number to have.&amp;nbsp; I also wanted it to automatically renumber.&amp;nbsp; So if they already have a number with a priority of 1 and they add or update a number and set it's priority to 1, that one becomes the new #1 and everything else moves down.&amp;nbsp; For this problem, there is a contact table, a phone table and a contactphonexref table that contains the contactid, a phoneid, and a sequence number (priority)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Here is what I came up with in the stored proc to do the reordering....&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#ff0000 size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#0000ff&gt;&lt;FONT color=#000000&gt;&lt;/FONT&gt;First thing was to insert or update the contactphonexref record.&amp;nbsp; Here we set the seqno to whatever the user typed in be it 1,3, or 10000.&amp;nbsp; I left this code out because it seems obvious.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#ff0000 size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#0000ff&gt;Next was to figure out a way to renumber.&amp;nbsp; I wanted to guarantee that the record being inserted or updated got put in the position that the user requested even if it meant bumping others down.&lt;BR&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Verdana color=#ff0000 size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#0000ff&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff&gt;I didn't want to use a cursor, so I thought I would try creating a table variable that has an identity and store the contactphonexrefid and the seqno&lt;/FONT&gt;&lt;BR&gt;declare @t table (newseqno int identity(1,1), contactphonexrefid int, seqno int)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Verdana color=#ff0000 size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#0000ff&gt;Then I just do an insert into my table variable for all phone records for this contact and order by seqno.&amp;nbsp; As I noted above, I wanted to make sure if the record being inserted or updated had the same sequence number as another record for that contact, the new record got that number.&amp;nbsp; So, I decided I would&amp;nbsp;take the&amp;nbsp;absolute value of&amp;nbsp;the contactphonexrefid in my table variable&amp;nbsp;minus the contactphonexrefid of the record that got inserted or updated.&amp;nbsp; The thinking there is the record being inserted or updated will always have a&amp;nbsp;absolute value of zero&amp;nbsp;and everything else will be greater than zero so it ensures the new record wins.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Verdana color=#ff0000 size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;insert into @t (contactphonexrefid, seqno)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Verdana color=#ff0000 size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;select contactphonexrefid, seqno from contactphonexref (nolock) where contactid = @contactid&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Verdana color=#ff0000 size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; order by seqno, abs(@ContactPhonexrefId&amp;nbsp;- contactphonexrefid)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Verdana color=#0000ff size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;Once this is done, simply update the contactphonexref table from the table variable and set the seqno equal to the identity column which I called newseqno.&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Verdana color=#ff0000 size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&lt;FONT color=#ff0000&gt;&lt;FONT face=Verdana&gt;update contactphonexref set seqno = t.newseqno&lt;/FONT&gt; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial color=#ff0000 size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM contactphonexref cpa &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial color=#ff0000 size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inner join @t t on t.contactphonexrefid = cpa.contactphonexrefid&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal&gt;&lt;FONT face=Arial color=#ff0000 size=2&gt;&lt;SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where contactid = @contactid&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana color=#000000 size=2&gt;This solution seems to work quite well for me.&amp;nbsp; It is basically an implementation of a stack.&amp;nbsp; I would be interested in hearing other solutions people have used to accomplish this.&amp;nbsp; Special thanks to beej for some insight on this.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/gstark/archive/2005/03/09/2551.aspx&amp;amp;;subject=SQL+Renumbering" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/03/09/2551.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/gstark/archive/2005/03/09/2551.aspx&amp;amp;;title=SQL+Renumbering" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/03/09/2551.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/gstark/archive/2005/03/09/2551.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/03/09/2551.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/gstark/archive/2005/03/09/2551.aspx&amp;amp;title=SQL+Renumbering" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/03/09/2551.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/gstark/archive/2005/03/09/2551.aspx&amp;amp;;title=SQL+Renumbering" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/03/09/2551.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/gstark/archive/2005/03/09/2551.aspx&amp;amp;;title=SQL+Renumbering&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/03/09/2551.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2551" width="1" height="1"&gt;</content><author><name>gstark</name><uri>http://aspadvice.com/members/gstark.aspx</uri></author></entry><entry><title>C# Type Conversion</title><link rel="alternate" type="text/html" href="http://aspadvice.com/blogs/gstark/archive/2005/02/10/2550.aspx" /><id>http://aspadvice.com/blogs/gstark/archive/2005/02/10/2550.aspx</id><published>2005-02-11T00:26:00Z</published><updated>2005-02-11T00:26:00Z</updated><content type="html">&lt;P&gt;I have been running into some issues with type conversion lately.&amp;nbsp; I never have quite figured out the differences between all the different ways you can do type conversions.&amp;nbsp; There are 3 that I use throughout my code.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;(int) myVariable&lt;/LI&gt;
&lt;LI&gt;myVariable as int&lt;/LI&gt;
&lt;LI&gt;Convert.ToInt32(myVariable)&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;I found a few articles on MSDN regarding the subject that helped clear the water a little.&amp;nbsp; &lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcontypeconversiontables.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcontypeconversiontables.asp&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconconvertingwithsystemconvert.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconconvertingwithsystemconvert.asp&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconexplicitconversion.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconexplicitconversion.asp&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;If anyone else has any good references surrounding type conversions, please let me know.&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a href = "mailto:?body=Thought you might like this: http://aspadvice.com/blogs/gstark/archive/2005/02/10/2550.aspx&amp;amp;;subject=C%23+Type+Conversion" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/02/10/2550.aspx"&gt;email it!&lt;/a&gt; |  &lt;a href = "http://del.icio.us/post?url=http://aspadvice.com/blogs/gstark/archive/2005/02/10/2550.aspx&amp;amp;;title=C%23+Type+Conversion" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/02/10/2550.aspx"&gt;bookmark it!&lt;/a&gt; |  &lt;a href = "http://www.digg.com/submit?url=http://aspadvice.com/blogs/gstark/archive/2005/02/10/2550.aspx&amp;amp;;phase=2" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/02/10/2550.aspx"&gt;digg it!&lt;/a&gt; |  &lt;a href = "http://reddit.com/submit?url=http://aspadvice.com/blogs/gstark/archive/2005/02/10/2550.aspx&amp;amp;title=C%23+Type+Conversion" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/02/10/2550.aspx"&gt;reddit!&lt;/a&gt; |  &lt;a href = "http://www.dotnetkicks.com/submit/?url=http://aspadvice.com/blogs/gstark/archive/2005/02/10/2550.aspx&amp;amp;;title=C%23+Type+Conversion" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/02/10/2550.aspx"&gt;kick it!&lt;/a&gt; |  &lt;a href = "https://favorites.live.com/quickadd.aspx?marklet=1&amp;amp;;mkt=en-us&amp;amp;;url=http://aspadvice.com/blogs/gstark/archive/2005/02/10/2550.aspx&amp;amp;;title=C%23+Type+Conversion&amp;amp;;top=1" target="_blank" title = "Post http://aspadvice.com/blogs/gstark/archive/2005/02/10/2550.aspx"&gt;live it!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://aspadvice.com/aggbug.aspx?PostID=2550" width="1" height="1"&gt;</content><author><name>gstark</name><uri>http://aspadvice.com/members/gstark.aspx</uri></author></entry></feed>