Click here to Skip to main content
15,881,803 members
Home / Discussions / C#
   

C#

 
AnswerRe: Method to set time Pin
Vikram A Punathambekar6-Sep-07 0:14
Vikram A Punathambekar6-Sep-07 0:14 
GeneralRe: Method to set time Pin
iet20006-Sep-07 1:19
iet20006-Sep-07 1:19 
QuestionCompare Word docs Pin
Nitin.raj5-Sep-07 23:53
Nitin.raj5-Sep-07 23:53 
AnswerRe: Compare Word docs Pin
originSH6-Sep-07 0:05
originSH6-Sep-07 0:05 
Questioncrystal report export problem Pin
sakthi dasan5-Sep-07 23:38
sakthi dasan5-Sep-07 23:38 
QuestionLicencing Problem urgent Pin
Nishad855-Sep-07 23:34
Nishad855-Sep-07 23:34 
AnswerRe: Licencing Problem urgent Pin
MicealG6-Sep-07 1:27
MicealG6-Sep-07 1:27 
QuestionString.IsNullOrEmpty Pin
nasambur5-Sep-07 23:31
nasambur5-Sep-07 23:31 
Hi,
Which one gives better performance, checking a string against null & empty.

string s = "something";

for(int i=0; i<100; i++) {
  if(s != null) {
    if(s.Length > 0) {
      // do something
    }
  }
}

or
for(int i=0; i<100; i++) {
  if(!String.IsNullOrEmpty(s)) {
    // do something
  }
}


plz help,
nas
AnswerRe: String.IsNullOrEmpty Pin
originSH5-Sep-07 23:49
originSH5-Sep-07 23:49 
JokeRe: String.IsNullOrEmpty Pin
ednrgc7-Sep-07 4:26
ednrgc7-Sep-07 4:26 
AnswerRe: String.IsNullOrEmpty Pin
Urs Enzler6-Sep-07 1:02
Urs Enzler6-Sep-07 1:02 
AnswerRe: String.IsNullOrEmpty Pin
Colin Angus Mackay6-Sep-07 1:13
Colin Angus Mackay6-Sep-07 1:13 
GeneralRe: String.IsNullOrEmpty Pin
PIEBALDconsult6-Sep-07 4:47
mvePIEBALDconsult6-Sep-07 4:47 
GeneralRe: String.IsNullOrEmpty Pin
Colin Angus Mackay6-Sep-07 6:00
Colin Angus Mackay6-Sep-07 6:00 
GeneralRe: String.IsNullOrEmpty Pin
PIEBALDconsult6-Sep-07 6:24
mvePIEBALDconsult6-Sep-07 6:24 
Questionsealed classes Pin
Sonia Gupta5-Sep-07 23:29
Sonia Gupta5-Sep-07 23:29 
AnswerRe: sealed classes Pin
originSH5-Sep-07 23:46
originSH5-Sep-07 23:46 
GeneralRe: sealed classes Pin
Sonia Gupta6-Sep-07 0:52
Sonia Gupta6-Sep-07 0:52 
GeneralRe: sealed classes Pin
Urs Enzler6-Sep-07 1:05
Urs Enzler6-Sep-07 1:05 
GeneralRe: sealed classes Pin
Pete O'Hanlon6-Sep-07 1:35
mvePete O'Hanlon6-Sep-07 1:35 
GeneralRe: sealed classes Pin
Pete O'Hanlon6-Sep-07 1:49
mvePete O'Hanlon6-Sep-07 1:49 
AnswerRe: sealed classes Pin
PIEBALDconsult6-Sep-07 4:49
mvePIEBALDconsult6-Sep-07 4:49 
GeneralRe: sealed classes Pin
Scott Dorman6-Sep-07 18:09
professionalScott Dorman6-Sep-07 18:09 
QuestionInsert character Pin
M Riaz Bashir5-Sep-07 23:14
M Riaz Bashir5-Sep-07 23:14 
AnswerRe: Insert character Pin
blackjack21505-Sep-07 23:22
blackjack21505-Sep-07 23:22 

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.