473,506 Members | 13,088 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

read this thread


hi gust go thrpugh this link n read thread " Shall I now always use
String.Empty instead of """
http://www.microsoft.com/communities...4-63cd93fffd10
Feb 14 '07 #1
3 972
On Feb 14, 12:21 pm, Mukesh <efex...@newsgroups.nospamwrote:
hi gust go thrpugh this link n read thread " Shall I now always use
String.Empty instead of """

http://www.microsoft.com/communities...efault.aspx?qu...
It's up to you

Feb 14 '07 #2
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.

Feb 15 '07 #3
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.

Feb 19 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1542
by: Jon Perez | last post by:
Is it safe to not put a lock on an object if it will always be read-only in other threads and will only ever be written to in just one and always the same one thread?
18
4856
by: jas | last post by:
Hi, I would like to start a new process and be able to read/write from/to it. I have tried things like... import subprocess as sp p = sp.Popen("cmd.exe", stdout=sp.PIPE)...
8
4040
by: noleander | last post by:
I've got two threads reading from one disk file (I'm using the Pthread library). I need each thread to have its own file seek pointer, so they can read from independent parts of the file. I...
1
7361
by: crashed | last post by:
Hi, I am using C# in .NET 2.0 and im trying to read a stream from a socket. The code works on the first attempt but fails on subsequent attempts. It is in a multithreaded application. It seems...
4
7527
by: DaveR | last post by:
I have a background thread to accept and process TCP/IP connections. When the application shuts down I want to gracefully terminate it. The thread will block in NetworkStream.Read() waiting for...
17
5389
by: Ryan Liu | last post by:
Hi, If I have many threads write to a variable(e.g. var++) and another thread read it on an interval base. For those writing thread, I know I need lock, or its value could be lower ( even I...
7
7251
by: Boki | last post by:
Multi-thread read/write to a single file. I have two processing threads, thread A and thread B; and I called my queue as Q. Thread A will feed data into Q by user input, the timing is random....
10
6954
by: marss | last post by:
<hr style="height:1px"/does not fit because although a line looks like it has 1 pixel with but there are empty spaces above and below line. It can be seen if place two HR elements beside. <hr...
1
5678
by: Sheth Raxit | last post by:
even thred is not part of C-std, i feel its most relavant to comp.lang.c hope it will not off-topic ------- I am having data/or Text file, which is only used for reading by multiplethreads in...
3
2672
by: Ryan Liu | last post by:
Will TcpClient.GetStream().Read()/ReadByte() block until at least one byte of data can be read? In a Client/Server application, what does it mean at the end of stream/no more data available? ...
0
7220
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7105
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7023
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7479
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5617
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3178
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1534
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.