Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
Questionstring.Empty Vs "" Pin
Abhijit Jana26-Jun-08 23:53
professionalAbhijit Jana26-Jun-08 23:53 
AnswerRe: string.Empty Vs "" Pin
N a v a n e e t h26-Jun-08 23:58
N a v a n e e t h26-Jun-08 23:58 
GeneralRe: string.Empty Vs "" Pin
Paw Jershauge27-Jun-08 0:10
Paw Jershauge27-Jun-08 0:10 
GeneralRe: string.Empty Vs "" Pin
N a v a n e e t h27-Jun-08 0:37
N a v a n e e t h27-Jun-08 0:37 
GeneralRe: string.Empty Vs "" Pin
S. Senthil Kumar27-Jun-08 4:27
S. Senthil Kumar27-Jun-08 4:27 
AnswerRe: string.Empty Vs "" [modified] Pin
Paw Jershauge27-Jun-08 0:10
Paw Jershauge27-Jun-08 0:10 
GeneralRe: string.Empty Vs "" Pin
Abhijit Jana27-Jun-08 0:40
professionalAbhijit Jana27-Jun-08 0:40 
GeneralRe: string.Empty Vs "" Pin
Guffa27-Jun-08 1:20
Guffa27-Jun-08 1:20 
Paw Jershauge wrote:
string can have the value of null, Empty or "".


That is not really correct.

The null value is not a string value, it's the string reference that is null.

The Empty value is not a value, it's just a predefined constant that is an empty string ("").

Paw Jershauge wrote:
Empty and null = no memory usage


That is not really correct.

As Empty is just a string constant, "" and Empty work exactly the same, and use the same amount of memory. In both cases they are literal strings, so they are predefined in the assembly data, not allocated on the heap.

Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: string.Empty Vs "" Pin
S. Senthil Kumar27-Jun-08 4:39
S. Senthil Kumar27-Jun-08 4:39 
AnswerRe: string.Empty Vs "" Pin
Christian Graus27-Jun-08 0:23
protectorChristian Graus27-Jun-08 0:23 
GeneralRe: string.Empty Vs "" Pin
N a v a n e e t h27-Jun-08 0:40
N a v a n e e t h27-Jun-08 0:40 
GeneralRe: string.Empty Vs "" Pin
Guffa27-Jun-08 1:31
Guffa27-Jun-08 1:31 
AnswerRe: string.Empty Vs "" Pin
Guffa27-Jun-08 1:43
Guffa27-Jun-08 1:43 
GeneralRe: string.Empty Vs "" Pin
Pete O'Hanlon27-Jun-08 1:53
mvePete O'Hanlon27-Jun-08 1:53 
GeneralRe: string.Empty Vs "" Pin
Mark Churchill27-Jun-08 16:39
Mark Churchill27-Jun-08 16:39 
AnswerRe: string.Empty Vs "" Pin
Jamal Mavadat27-Jun-08 5:34
Jamal Mavadat27-Jun-08 5:34 
Questionscalar variable Pin
j_tush26-Jun-08 23:52
j_tush26-Jun-08 23:52 
AnswerRe: scalar variable Pin
Christian Graus27-Jun-08 0:25
protectorChristian Graus27-Jun-08 0:25 
QuestionNeed help with an regular expression Pin
Paw Jershauge26-Jun-08 23:43
Paw Jershauge26-Jun-08 23:43 
AnswerRe: Need help with an regular expression Pin
Vimalsoft(Pty) Ltd27-Jun-08 0:59
professionalVimalsoft(Pty) Ltd27-Jun-08 0:59 
GeneralRe: Need help with an regular expression Pin
Paw Jershauge27-Jun-08 1:07
Paw Jershauge27-Jun-08 1:07 
AnswerRe: Need help with an regular expression Pin
Paw Jershauge27-Jun-08 1:58
Paw Jershauge27-Jun-08 1:58 
AnswerRe: Need help with an regular expression Pin
User 665827-Jun-08 4:19
User 665827-Jun-08 4:19 
GeneralRe: Need help with an regular expression Pin
Paw Jershauge28-Jun-08 3:22
Paw Jershauge28-Jun-08 3:22 
GeneralRe: Need help with an regular expression Pin
User 665828-Jun-08 3:31
User 665828-Jun-08 3:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.