read this thread

S

Steven Cheng[MSFT]

Hello Mukesh,

As Alexey mentioned, which one to use is really up to you. IMO, using
String.Empty should be preferred if you have used such value to initialize
your string variable all over your project's code. Because such static
constant provide an intermediate encapsulation of the actual value.
Regardless of the particular empty string value here, whenever you want to
assign the same value for many variables in your code, if you use such a
static constant, it will be quite convenient to maintain. Later, when the
initia value need to be changed or updated in sequential version, you can
simply change that static constants' definition only. Do you think so?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Steven Cheng[MSFT]

Hello Mukesh,

Have you any further questions on this? If there is anything else we can
help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top