× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Mon, Nov 28, 2016 at 3:36 PM, Justin Taylor <JUSTIN@xxxxxxxxxxxxx> wrote:
It's not my policy, so I don't know the details. When I was first conscripted into doing some VB, a grizzled old veteran specifically said empty strings waste memory.

So what did the VB veteran recommend instead of (myVar = "")?

When they hired a new Windows programming bureaucrat last year, he sent out a link to a published C# best practices, and it said not to do (myVar = ""). I don't think it gave a reason.

Any time no reason is given, it smells fishy to me. In this particular
case, I think the recommendation is based on a misinterpretation of an
outdated factoid. (Namely, that "" instantiates a new object, while
string.Empty does not.) I don't think the wasted-memory argument
against "" was ever correct, and I am positive it hasn't been correct
for many, many years now.

John Y.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.