Click here to Skip to main content
15,902,634 members
Home / Discussions / C#
   

C#

 
AnswerRe: Extract data out of a LARGE text file Pin
Luc Pattyn30-Jan-07 12:36
sitebuilderLuc Pattyn30-Jan-07 12:36 
GeneralRe: Extract data out of a LARGE text file Pin
amatbrewer30-Jan-07 12:49
amatbrewer30-Jan-07 12:49 
GeneralRe: Extract data out of a LARGE text file Pin
Luc Pattyn30-Jan-07 13:05
sitebuilderLuc Pattyn30-Jan-07 13:05 
GeneralRe: Extract data out of a LARGE text file Pin
amatbrewer30-Jan-07 16:05
amatbrewer30-Jan-07 16:05 
GeneralRe: Extract data out of a LARGE text file Pin
spin vector30-Jan-07 17:29
spin vector30-Jan-07 17:29 
GeneralRe: Extract data out of a LARGE text file Pin
amatbrewer31-Jan-07 7:41
amatbrewer31-Jan-07 7:41 
GeneralRe: Extract data out of a LARGE text file Pin
spin vector30-Jan-07 17:35
spin vector30-Jan-07 17:35 
Questionoptimization of type comparison Pin
spin vector30-Jan-07 12:20
spin vector30-Jan-07 12:20 
I'm overriding an Equals() method in .NET which a type specialization in mind but don't want to kill my code in stupid ways. So:

public override bool Equals(object obj)
{
if ( obj.GetType() == typeof(double) )
// foo
else
return base.Equals(obj)
}

The line to optimize is "if ( obj.GetType() == typeof(double) )". The constant typeof(double) calls is a waste. Tried "if ( obj.GetType().Name == "System.Double" )" with horrible results.

Any optimizations out there? Thx!
AnswerRe: optimization of type comparison Pin
Christian Graus30-Jan-07 12:30
protectorChristian Graus30-Jan-07 12:30 
AnswerRe: optimization of type comparison Pin
Luc Pattyn30-Jan-07 12:38
sitebuilderLuc Pattyn30-Jan-07 12:38 
GeneralRe: optimization of type comparison Pin
spin vector30-Jan-07 12:49
spin vector30-Jan-07 12:49 
GeneralRe: optimization of type comparison Pin
Luc Pattyn30-Jan-07 13:08
sitebuilderLuc Pattyn30-Jan-07 13:08 
GeneralRe: optimization of type comparison Pin
Christian Graus30-Jan-07 14:12
protectorChristian Graus30-Jan-07 14:12 
GeneralRe: optimization of type comparison Pin
Luc Pattyn30-Jan-07 14:37
sitebuilderLuc Pattyn30-Jan-07 14:37 
Questionstring Pin
netJP12L30-Jan-07 12:11
netJP12L30-Jan-07 12:11 
AnswerRe: string Pin
Christian Graus30-Jan-07 12:15
protectorChristian Graus30-Jan-07 12:15 
Questionprinter - get last page number to be printed Pin
FreewareFire30-Jan-07 11:34
FreewareFire30-Jan-07 11:34 
AnswerRe: printer - get last page number to be printed Pin
netJP12L30-Jan-07 12:15
netJP12L30-Jan-07 12:15 
QuestionRegex Match probleb Pin
gigo2k630-Jan-07 10:55
gigo2k630-Jan-07 10:55 
AnswerRe: Regex Match probleb Pin
Christian Graus30-Jan-07 11:09
protectorChristian Graus30-Jan-07 11:09 
GeneralRe: Regex Match probleb Pin
gigo2k630-Jan-07 11:22
gigo2k630-Jan-07 11:22 
GeneralRe: Regex Match probleb Pin
Christian Graus30-Jan-07 11:33
protectorChristian Graus30-Jan-07 11:33 
QuestionIs it pssoble to use a VS.net wizard at runtim? Pin
xstoneheartx30-Jan-07 10:39
xstoneheartx30-Jan-07 10:39 
AnswerRe: Is it pssoble to use a VS.net wizard at runtim? Pin
Christian Graus30-Jan-07 10:41
protectorChristian Graus30-Jan-07 10:41 
QuestionDisable Listview Key Processing Pin
andymo230-Jan-07 10:25
andymo230-Jan-07 10:25 

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.