<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>C#</title><link>http://forums.asp.net/37.aspx</link><description>Discussions/Questions about the C# language. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=13&amp;c=23" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: string.Empty vs ""</title><link>http://forums.asp.net/thread/2653628.aspx</link><pubDate>Tue, 30 Sep 2008 07:22:57 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2653628</guid><dc:creator>Xiaoth</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2653628.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=2653628</wfw:commentRss><description>&lt;p&gt;As far as I&amp;#39;m concerned, it&amp;#39;s a question of productivity vs. performance, not a question of performance or correctness alone. If you really want to sit there and type S-t-r-i-n-g-.-E-m-p-t-y, go right ahead. It&amp;#39;s worth it if you have an awful lot of empty strings in loops. ;)&amp;nbsp; &lt;/p&gt;&lt;p&gt;That said, I once created a macro (as a result of reading this thread, a couple years ago), that would detect when I typed &amp;quot;&amp;quot; and replace it with String.Empty. I removed it after a few weeks because it was so distracting and I never got use to the fugly presence of all that code (&amp;quot;String.Empty&amp;quot;) for such a simple thing. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: string.Empty vs ""</title><link>http://forums.asp.net/thread/2649789.aspx</link><pubDate>Sat, 27 Sep 2008 11:30:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2649789</guid><dc:creator>TATWORTH</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2649789.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=2649789</wfw:commentRss><description>&lt;p&gt;StyleCop requires string.Empty over an empty string. - Given its pedigree, I accept its advice in the matter.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: string.Empty vs ""</title><link>http://forums.asp.net/thread/2647987.aspx</link><pubDate>Fri, 26 Sep 2008 11:29:23 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2647987</guid><dc:creator>devbrat_ghosh</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2647987.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=2647987</wfw:commentRss><description>&lt;p&gt;Thanks to all contributors. This question arise several times . I took &lt;font face="Verdana"&gt;Ryan reply as answer of my long lasting doubt.&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: string.Empty vs ""</title><link>http://forums.asp.net/thread/1251131.aspx</link><pubDate>Fri, 07 Apr 2006 14:38:06 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1251131</guid><dc:creator>nberardi</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1251131.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=1251131</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;bitmask:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;KraGiE:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; Since "" is actually a value type, it'll create that object anyways, but yeah.&amp;nbsp; I tend to use String.Empty also.&amp;nbsp;&lt;br /&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Actually, since it is still a string, it's a reference type ;)&lt;/p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;However strings are immutable, which in a high level over view means they act like a value type.&amp;nbsp; In addition I also think the compiler checkes for other strings with the same signature to cut down on memory use.&amp;nbsp; I could be wrong on the previous statement, however all that being said I am still an advocate of String.Empty because it is cleaner and on the off chance an empty string ever changes to "*" my programs are all set.&amp;nbsp; &lt;img src="/emoticons/emotion-2.gif" alt="Big Smile [:D]" /&gt;&lt;br /&gt;</description></item><item><title>Re: string.Empty vs ""</title><link>http://forums.asp.net/thread/1250970.aspx</link><pubDate>Fri, 07 Apr 2006 12:58:10 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1250970</guid><dc:creator>StrongTypes</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1250970.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=1250970</wfw:commentRss><description>&lt;font face=Verdana size=2&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;Xiaoth:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Why is it pointless? String.Empty is a whole lot more typing than "".&lt;/font&gt; 
&lt;div&gt;&lt;font face=Verdana size=2&gt;There is a performance difference but it's pretty minor.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=Verdana size=2&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font face=Verdana size=2&gt;1) I've read this too many times, but nobody has the research to proove it when they claim it.&lt;br /&gt;2)&amp;nbsp;The difference is&amp;nbsp;really minor. I can see how this might be important in a large scale project, but other than that it's like comparing apples and oranges.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=Verdana size=2&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font face=Verdana size=2&gt;Ryan&lt;/font&gt;&lt;/div&gt;</description></item><item><title>Re: string.Empty vs ""</title><link>http://forums.asp.net/thread/1250790.aspx</link><pubDate>Fri, 07 Apr 2006 08:51:20 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1250790</guid><dc:creator>Xiaoth</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1250790.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=1250790</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;StrongTypes:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;
&lt;p&gt;&lt;font face=Verdana size=2&gt;This is a pointless debate in the developer world, but "" creates an object instance&amp;nbsp;while String.Empty does not. I generally tend to use String.Empty over "".&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face=Verdana size=2&gt;HTH,&lt;br /&gt;Ryan&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;div&gt;&lt;font face=Arial size=2&gt;Why is it pointless? String.Empty is a whole lot more typing than "".&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=Arial size=2&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font face=Arial size=2&gt;There is a performance difference but it's pretty minor. In the tests below, the "" operations loop took up 15.85 to 15.88 seconds, while the String.Empty operations loop took up 15.82 to 15.87 seconds.&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face=Arial size=2&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void button3_Click(object sender, EventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DateTime dt = DateTime.Now;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string s = "";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 0; i &amp;lt; 1000000000; i++)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (s == "")&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s = "";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TimeSpan ts = new TimeSpan(DateTime.Now.Ticks - dt.Ticks);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; textBox1.Text = ts.ToString();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Courier New"&gt;&lt;/font&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;font face="Courier New" size=2&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void button4_Click(object sender, EventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DateTime dt = DateTime.Now;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string s = String.Empty;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 0; i &amp;lt; 1000000000; i++)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (s == String.Empty)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; s = String.Empty;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TimeSpan ts = new TimeSpan(DateTime.Now.Ticks - dt.Ticks);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; textBox1.Text = ts.ToString();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/div&gt;</description></item><item><title>Re: string.Empty vs ""</title><link>http://forums.asp.net/thread/1250464.aspx</link><pubDate>Thu, 06 Apr 2006 22:34:51 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1250464</guid><dc:creator>KraGiE</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1250464.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=1250464</wfw:commentRss><description>what does int? have to do with ""?&amp;nbsp; a nullable type doesn't dignify anything in regards to using "" in place of an ANSI SQL's null value.. int? x = DBNull.Value returns Error&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp; Cannot implicitly convert type 'System.DBNull' to 'int?'&amp;nbsp;&amp;nbsp; So where are you going with this?&lt;br /&gt;&lt;br /&gt;edited:&lt;br /&gt;Caddre, did you read that blog?&amp;nbsp; It talks about nullable types that was introduced to c#2.0.&amp;nbsp; Meaning..&lt;br /&gt;&lt;br /&gt;int xyz;&lt;br /&gt;&lt;br /&gt;if (xyz != null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // this was not possible in previous versions of .net&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;It's to remove the need to explicitly set a value to value types.&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: string.Empty vs ""</title><link>http://forums.asp.net/thread/1250263.aspx</link><pubDate>Thu, 06 Apr 2006 19:16:44 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1250263</guid><dc:creator>Caddre</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1250263.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=1250263</wfw:commentRss><description>&lt;p&gt;I will not dignify that with an answer.&lt;/p&gt;
&lt;p class=MsoNormal&gt;&lt;a href="http://blogs.msdn.com/somasegar/archive/2005/08/11/450640.aspx"&gt;http://blogs.msdn.com/somasegar/archive/2005/08/11/450640.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal&gt;&lt;span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: string.Empty vs ""</title><link>http://forums.asp.net/thread/1250202.aspx</link><pubDate>Thu, 06 Apr 2006 18:40:48 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1250202</guid><dc:creator>KraGiE</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1250202.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=1250202</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;Caddre:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Kay,
&lt;p class="MsoNormal"&gt;This is the beauty of these forums because when you tell other people they are confused about something for &lt;span&gt;&amp;nbsp;&lt;/span&gt;making a mistake you can make the same mistake,&amp;nbsp;'''' is sometimes used by object developers to deal with ANSI SQL null &lt;span&gt;&amp;nbsp;&lt;/span&gt;because as the CLR team's head Brad Abrams said Strings are reference types that thinks they are value types.&amp;nbsp; We are human.&lt;/p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br /&gt;&lt;br /&gt;Caddre, that is the beauty of the forums.&amp;nbsp; The string being a reference type instead of  value type is a common one, and it's something I did know.&amp;nbsp; I just jumped the gun and typed before thinking.&amp;nbsp; This is quite a bit different than being "confused".&lt;br /&gt;&lt;br /&gt;Also, I believe ANSI Sql's Nulls are totally different from an empty string.&amp;nbsp; Where in the world do people actually use "" to deal with ANSI SQL null?&amp;nbsp; I always thought "object developers" had objects defined to map efficiently and correctly to other objects.. being that "" in ANSI SQL is completely different than "&amp;lt;null&amp;gt;"&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: string.Empty vs ""</title><link>http://forums.asp.net/thread/1250187.aspx</link><pubDate>Thu, 06 Apr 2006 18:29:06 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1250187</guid><dc:creator>Caddre</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1250187.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=1250187</wfw:commentRss><description>Strings are Immutable that is the CS term for it. &amp;nbsp;LOL &amp;nbsp; And have a nice day.</description></item><item><title>Re: string.Empty vs ""</title><link>http://forums.asp.net/thread/1250186.aspx</link><pubDate>Thu, 06 Apr 2006 18:25:59 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1250186</guid><dc:creator>KraGiE</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1250186.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=1250186</wfw:commentRss><description>You're absolutely right.&amp;nbsp; I'm actually blushing.&amp;nbsp; haha&amp;nbsp; It's just one of those things that basically creates a shallow copy when entering methods.&amp;nbsp; It's one of those reference types that doesn't really pass around a reference, but rather creates a shallow copy so any changes in the called method doesn't refect the altered value in the calling method.&lt;br /&gt;&lt;br /&gt;If that makes sense.&amp;nbsp; :)&amp;nbsp; &lt;br /&gt;</description></item><item><title>Re: string.Empty vs ""</title><link>http://forums.asp.net/thread/1250175.aspx</link><pubDate>Thu, 06 Apr 2006 18:21:30 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1250175</guid><dc:creator>Caddre</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1250175.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=1250175</wfw:commentRss><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;bitmask:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;KraGiE:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; Since "" is actually a value type, it'll create that object anyways, but yeah.&amp;nbsp; I tend to use String.Empty also.&amp;nbsp;&lt;br /&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Actually, since it is still a string, it's a reference type ;)&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p class=MsoNormal&gt;Kay,&lt;/p&gt;
&lt;p class=MsoNormal&gt;This is the beauty of these forums because when you tell other people they are confused about something for &lt;span&gt;&amp;nbsp;&lt;/span&gt;making a mistake you can make the same mistake,&amp;nbsp;'''' is sometimes used by object developers to deal with ANSI SQL null &lt;span&gt;&amp;nbsp;&lt;/span&gt;because as the CLR team's head Brad Abrams said Strings are reference types that thinks they are value types.&amp;nbsp; We are human.&lt;/p&gt;</description></item><item><title>Re: string.Empty vs ""</title><link>http://forums.asp.net/thread/1249934.aspx</link><pubDate>Thu, 06 Apr 2006 15:26:07 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1249934</guid><dc:creator>bitmask</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1249934.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=1249934</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/default/images/icon-quote.gif"&gt; &lt;strong&gt;KraGiE:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; Since "" is actually a value type, it'll create that object anyways, but yeah.&amp;nbsp; I tend to use String.Empty also.&amp;nbsp;&lt;br /&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Actually, since it is still a string, it's a reference type ;)&lt;/p&gt;</description></item><item><title>Re: string.Empty vs ""</title><link>http://forums.asp.net/thread/1244587.aspx</link><pubDate>Fri, 31 Mar 2006 20:58:58 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1244587</guid><dc:creator>KraGiE</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1244587.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=1244587</wfw:commentRss><description>Yeah.&amp;nbsp; String.Empty is a read-only that returns "".&amp;nbsp; Since "" is actually a value type, it'll create that object anyways, but yeah.&amp;nbsp; I tend to use String.Empty also.&amp;nbsp; I believe it's faster, but I really don't have the core internals to prove it.&lt;br /&gt;</description></item><item><title>Re: string.Empty vs ""</title><link>http://forums.asp.net/thread/1244174.aspx</link><pubDate>Fri, 31 Mar 2006 14:53:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1244174</guid><dc:creator>StrongTypes</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1244174.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=37&amp;PostID=1244174</wfw:commentRss><description>&lt;p&gt;&lt;font face=Verdana size=2&gt;This is a pointless debate in the developer world, but "" creates an object instance&amp;nbsp;while String.Empty does not. I generally tend to use String.Empty over "".&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face=Verdana size=2&gt;HTH,&lt;br /&gt;Ryan&lt;/font&gt;&lt;/p&gt;</description></item></channel></rss>