Re: Tough question on database NULLs.
- From: "Ciaran" <ciaran@xxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 10 Jul 2006 22:48:43 +0100
When a function is JIT compiled, the compiler 'interns' all the strings in
it and uses a single instance of each unique hard coded string for that
function. Empty strings are replace for string.Empty at this point. The
reason string.Empty exists is because string is a reference type, it saves
memory only having one copy of an empty string object in memory.
Ciaran
There are 10 types of people in this world, those that understand binary,
and those that don't.
"Mark Wilden" <MarkWilden@xxxxxxxxxxxxxxxxx> wrote in message
news:u%23EwC8EpGHA.5104@xxxxxxxxxxxxxxxxxxxxxxx
"Michael Nemtsev" <nemtsev@xxxxxxx> wrote in message
news:1799a79b39e84f8c87281c96a3568@xxxxxxxxxxxxxxxxxxxxxxx
PS: use == String.Empty in lue of == ''
I've heard this recommendation before. What is its rationale?
///ark
.
- Follow-Ups:
- Re: Tough question on database NULLs.
- From: Mark Wilden
- Re: Tough question on database NULLs.
- References:
- Tough question on database NULLs.
- From: Karen Hill
- Re: Tough question on database NULLs.
- From: Michael Nemtsev
- Re: Tough question on database NULLs.
- From: Mark Wilden
- Tough question on database NULLs.
- Prev by Date: More about remoting
- Next by Date: Null reference exception when trying to use DataAdapter Update
- Previous by thread: Re: Tough question on database NULLs.
- Next by thread: Re: Tough question on database NULLs.
- Index(es):
Relevant Pages
|