Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
AnswerRe: TreeNode.FullPath Pin
Mircea Puiu12-Jan-07 4:07
Mircea Puiu12-Jan-07 4:07 
QuestionAssign items to DatagridView Combobox Cell Pin
Tyler4512-Jan-07 3:02
Tyler4512-Jan-07 3:02 
AnswerRe: Assign items to DatagridView Combobox Cell Pin
Tyler4512-Jan-07 3:54
Tyler4512-Jan-07 3:54 
QuestionLock ListView Colums Pin
Rapier50312-Jan-07 2:55
Rapier50312-Jan-07 2:55 
AnswerRe: Lock ListView Colums Pin
Mircea Puiu12-Jan-07 3:30
Mircea Puiu12-Jan-07 3:30 
QuestionCompare string and int Pin
szukuro12-Jan-07 2:26
szukuro12-Jan-07 2:26 
AnswerRe: Compare string and int Pin
Guffa12-Jan-07 2:41
Guffa12-Jan-07 2:41 
GeneralRe: Compare string and int [modified] Pin
szukuro12-Jan-07 3:27
szukuro12-Jan-07 3:27 
As I said before, the string is actually someint.ToString(). To be more precise, I'm actually getting a hidden field value in ASP.NET, which is of course a string. Since I set the value of the hidden field (on the client side), I also know the format, which happens to be the plain "42" type. Obviously in this case favoring one comparison over another doesn't actually make a difference at all. I was just curious if someone knows a best practice for this kind of problem. Perhaps in the future I will come across a similiar situation, where the differences in comparison time do matter. It's just like those someString.Length > 0 vs. someString != String.Empty questions.

[edit]Actually the problem is pretty much like the problem I mentioned as an example, as I am willing to except a third choice, if possible, like String.IsNullOrEmpty(someString) is for the example above Smile | :) [/edit]


-- modified at 9:33 Friday 12th January, 2007
AnswerRe: Compare string and int Pin
Guffa14-Jan-07 12:15
Guffa14-Jan-07 12:15 
AnswerRe: Compare string and int Pin
Mircea Puiu12-Jan-07 2:41
Mircea Puiu12-Jan-07 2:41 
AnswerRe: Compare string and int Pin
CPallini12-Jan-07 2:42
mveCPallini12-Jan-07 2:42 
AnswerRe: Compare string and int Pin
Thomas Stockwell13-Jan-07 5:42
professionalThomas Stockwell13-Jan-07 5:42 
QuestionHow to add images into Dropdownlist Pin
prabhakaranns12-Jan-07 1:17
prabhakaranns12-Jan-07 1:17 
AnswerRe: How to add images into Dropdownlist Pin
stancrm12-Jan-07 2:05
stancrm12-Jan-07 2:05 
QuestionHow to use SDI(single document interface)? Pin
bug_aonz11-Jan-07 23:47
bug_aonz11-Jan-07 23:47 
AnswerRe: How to use SDI(single document interface)? Pin
Pete O'Hanlon12-Jan-07 0:58
mvePete O'Hanlon12-Jan-07 0:58 
AnswerRe: How to use SDI(single document interface)? Pin
Christian Graus12-Jan-07 1:19
protectorChristian Graus12-Jan-07 1:19 
Questionvalidating question Pin
rzvme11-Jan-07 23:42
rzvme11-Jan-07 23:42 
AnswerRe: validating question Pin
Guffa12-Jan-07 0:48
Guffa12-Jan-07 0:48 
GeneralRe: validating question Pin
rzvme12-Jan-07 0:51
rzvme12-Jan-07 0:51 
QuestionNeed Basic Help or Samples About DataGrid [modified] Pin
M Riaz Bashir11-Jan-07 23:23
M Riaz Bashir11-Jan-07 23:23 
AnswerRe: Need Basic Help or Samples About DataGrid Pin
Ravi Bhavnani12-Jan-07 2:59
professionalRavi Bhavnani12-Jan-07 2:59 
Questionhow to override the priority of an event Pin
kalaveer11-Jan-07 23:05
kalaveer11-Jan-07 23:05 
AnswerRe: how to override the priority of an event Pin
Seishin#12-Jan-07 0:11
Seishin#12-Jan-07 0:11 
AnswerRe: how to override the priority of an event Pin
S. Senthil Kumar12-Jan-07 6:48
S. Senthil Kumar12-Jan-07 6:48 

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.