Click here to Skip to main content
15,911,646 members
Home / Discussions / C#
   

C#

 
GeneralRe: Drawing Windows window Pin
Paulo Zemek25-Nov-09 11:14
Paulo Zemek25-Nov-09 11:14 
QuestionVS integrated designer Pin
careylin25-Nov-09 5:01
careylin25-Nov-09 5:01 
AnswerRe: VS integrated designer Pin
avigodse26-Nov-09 19:11
professionalavigodse26-Nov-09 19:11 
Questionbenifit of string constructor Pin
Member 225007225-Nov-09 3:25
Member 225007225-Nov-09 3:25 
AnswerRe: benifit of string constructor Pin
dan!sh 25-Nov-09 3:26
professional dan!sh 25-Nov-09 3:26 
AnswerRe: benifit of string constructor Pin
Simon P Stevens25-Nov-09 4:19
Simon P Stevens25-Nov-09 4:19 
AnswerRe: benifit of string constructor Pin
Shameel25-Nov-09 4:47
professionalShameel25-Nov-09 4:47 
AnswerRe: benifit of string constructor Pin
OriginalGriff25-Nov-09 5:34
mveOriginalGriff25-Nov-09 5:34 
As the others have said, there is no benefit - in fact yours is about as bad as it can get, as it creates up to 4 strings:
1) new string(new char[21])
2) "{0}"
3) "test"
4) strTemp = ...

It may produce four if it doesn't "spot" that string.Format("{0}", "test") is the same as "test". Optimisation will almost certainly reduce this to one, but it makes your code look like it is written by a beginner, whether you are one or not!

No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.

This message is made of fully recyclable Zeros and Ones

"Rumour has it that if you play Microsoft CDs backwards you will hear Satanic messages.Worse still, is that if you play them forwards they will install Windows"

AnswerRe: benifit of string constructor Pin
PIEBALDconsult25-Nov-09 12:17
mvePIEBALDconsult25-Nov-09 12:17 
QuestionA network-related or instance-specific error Pin
Jassim Rahma25-Nov-09 3:21
Jassim Rahma25-Nov-09 3:21 
AnswerRe: A network-related or instance-specific error Pin
Jassim Rahma25-Nov-09 3:38
Jassim Rahma25-Nov-09 3:38 
Questionserver application capturing audio from Skype Pin
johnyjj225-Nov-09 2:53
johnyjj225-Nov-09 2:53 
QuestionControl relocated if changing fontsize in designer Pin
rpm820025-Nov-09 2:08
rpm820025-Nov-09 2:08 
AnswerRe: Control relocated if changing fontsize in designer Pin
Gerry Schmitz25-Nov-09 3:05
mveGerry Schmitz25-Nov-09 3:05 
GeneralRe: Control relocated if changing fontsize in designer [modified] Pin
rpm820025-Nov-09 3:09
rpm820025-Nov-09 3:09 
QuestionRFID Pin
J imran25-Nov-09 2:06
J imran25-Nov-09 2:06 
AnswerRe: RFID Pin
harold aptroot25-Nov-09 2:18
harold aptroot25-Nov-09 2:18 
GeneralRe: RFID Pin
Nagy Vilmos25-Nov-09 3:39
professionalNagy Vilmos25-Nov-09 3:39 
GeneralRe: RFID Pin
harold aptroot25-Nov-09 4:01
harold aptroot25-Nov-09 4:01 
GeneralRe: RFID Pin
Luc Pattyn25-Nov-09 4:46
sitebuilderLuc Pattyn25-Nov-09 4:46 
GeneralRe: RFID Pin
OriginalGriff25-Nov-09 5:38
mveOriginalGriff25-Nov-09 5:38 
GeneralRe: RFID Pin
harold aptroot25-Nov-09 5:45
harold aptroot25-Nov-09 5:45 
GeneralRe: RFID Pin
J imran25-Nov-09 7:17
J imran25-Nov-09 7:17 
GeneralRe: RFID Pin
harold aptroot25-Nov-09 7:19
harold aptroot25-Nov-09 7:19 
GeneralRe: RFID Pin
J imran25-Nov-09 7:41
J imran25-Nov-09 7:41 

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.