Click here to Skip to main content
15,922,574 members
Home / Discussions / C#
   

C#

 
GeneralRe: register customized protocol Pin
ddrk4-Apr-03 17:18
ddrk4-Apr-03 17:18 
GeneralPrinting > How do I see the status of a printer Pin
Leon van Wyk3-Apr-03 22:25
professionalLeon van Wyk3-Apr-03 22:25 
General.NET remote object running locally Pin
dacris3-Apr-03 17:08
dacris3-Apr-03 17:08 
GeneralRe: .NET remote object running locally Pin
dacris4-Apr-03 2:05
dacris4-Apr-03 2:05 
Questionhow can get password and username in active directory? Pin
wangzhibin3-Apr-03 12:55
wangzhibin3-Apr-03 12:55 
Generalread binary registry key Pin
peterchen3-Apr-03 12:12
peterchen3-Apr-03 12:12 
GeneralRe: read binary registry key Pin
J. Dunlap4-Apr-03 7:08
J. Dunlap4-Apr-03 7:08 
GeneralProblems with ".Equals()" in listview code Pin
vlusardi3-Apr-03 12:08
vlusardi3-Apr-03 12:08 
The following is a chunk of code that I can't get to evaluate properly:

if( (lv.Tag.ToString().Equals((object)"dir")) )
{
MessageBox.Show("it's a dir")
}
else
{
MessageBox.Show("it's a file")
}

For example, if the value of "lv.Tag.ToString()" is "file", the expression evaluates to "true" and the "dir" branch is entered, so it thinks "file" an "dir" are equal.

if I change the chunk of code to reverse the logic like this:

if( (lv.Tag.ToString().Equals((object)"file")) )
{
MessageBox.Show("it's a file")
}
else
{
MessageBox.Show("it's a dir")
}

and send it a "dir" for the value of lv.Tag.ToString(), it evaluates to "false" and jumps to the proper logic...


Is this a known problem or am I doing something wrong...??

thanks.

GeneralCrystal Report distribution Pin
Mmithat3-Apr-03 12:05
Mmithat3-Apr-03 12:05 
GeneralConnection Gateway Pin
0siris3-Apr-03 11:49
0siris3-Apr-03 11:49 
QuestionTreeView and right click select? Pin
se99ts3-Apr-03 10:17
se99ts3-Apr-03 10:17 
AnswerRe: TreeView and right click select? Pin
mikasa3-Apr-03 11:02
mikasa3-Apr-03 11:02 
AnswerRe: TreeView and right click select? Pin
Leon van Wyk6-Apr-03 11:22
professionalLeon van Wyk6-Apr-03 11:22 
GeneralCalling C# function within javascript Pin
gekoscan3-Apr-03 8:26
gekoscan3-Apr-03 8:26 
GeneralRe: Calling C# function within javascript Pin
David Stone3-Apr-03 9:33
sitebuilderDavid Stone3-Apr-03 9:33 
GeneralProgramming Crystal Report that as Web Service... Pin
frontad3-Apr-03 8:21
frontad3-Apr-03 8:21 
GeneralMS Officeto XML Pin
theJazzyBrain3-Apr-03 8:04
theJazzyBrain3-Apr-03 8:04 
GeneralRe: MS Officeto XML Pin
Feng Qin4-Apr-03 2:13
Feng Qin4-Apr-03 2:13 
GeneralRe: MS Officeto XML Pin
theJazzyBrain6-Apr-03 21:56
theJazzyBrain6-Apr-03 21:56 
GeneralRe: MS Officeto XML Pin
Feng Qin7-Apr-03 18:11
Feng Qin7-Apr-03 18:11 
QuestionHow do you apply attributes to parameters? Pin
Kevin McFarlane3-Apr-03 6:30
Kevin McFarlane3-Apr-03 6:30 
AnswerRe: How do you apply attributes to parameters? Pin
David Stone3-Apr-03 7:20
sitebuilderDavid Stone3-Apr-03 7:20 
GeneralRe: How do you apply attributes to parameters? Pin
Kevin McFarlane3-Apr-03 10:23
Kevin McFarlane3-Apr-03 10:23 
GeneralRe: How do you apply attributes to parameters? Pin
David Stone3-Apr-03 13:40
sitebuilderDavid Stone3-Apr-03 13:40 
GeneralC# / XML attributes and values Pin
econner3-Apr-03 2:44
econner3-Apr-03 2:44 

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.