Click here to Skip to main content
15,915,780 members
Home / Discussions / C#
   

C#

 
QuestionGenerics: double x = (double)T fails Pin
Frygreen16-Aug-06 11:27
Frygreen16-Aug-06 11:27 
AnswerRe: Generics: double x = (double)T fails Pin
Ennis Ray Lynch, Jr.16-Aug-06 11:35
Ennis Ray Lynch, Jr.16-Aug-06 11:35 
GeneralRe: Generics: double x = (double)T fails [modified] Pin
Frygreen16-Aug-06 11:37
Frygreen16-Aug-06 11:37 
GeneralCode Pin
Ennis Ray Lynch, Jr.16-Aug-06 11:40
Ennis Ray Lynch, Jr.16-Aug-06 11:40 
GeneralRe: Code Pin
Frygreen16-Aug-06 11:47
Frygreen16-Aug-06 11:47 
GeneralRe: Code Pin
Ennis Ray Lynch, Jr.16-Aug-06 11:49
Ennis Ray Lynch, Jr.16-Aug-06 11:49 
GeneralRe: Code Pin
Frygreen16-Aug-06 12:04
Frygreen16-Aug-06 12:04 
GeneralRe: Code Pin
Frygreen16-Aug-06 12:25
Frygreen16-Aug-06 12:25 
Sorry dear guru.

Midnight has passed here and I have my next problem.

May be I get some help before I go to bed soon Wink | ;)

class XYZ {

void fct_1<T>(T x) where T : IConvertible {
double y = x.ToDouble(null);
}


void fct_2<T>(T x, T y) where T : IComparable {
if ( x < y ) {
// some action here
}
}
}


Function fct_1() works well now (thanks for your help)
But function fct_2 makes trouble now

The compiler says now: "operand '<' cannot be applied to operands of type 'T'"
Even if I restriected to 'Icomparable'

Do you have any hints for me?


Thanks in advance
GeneralRe: Code Pin
Stefan Troschuetz16-Aug-06 12:33
Stefan Troschuetz16-Aug-06 12:33 
GeneralRe: Code Pin
Frygreen16-Aug-06 12:40
Frygreen16-Aug-06 12:40 
GeneralRe: Code Pin
Stefan Troschuetz16-Aug-06 12:46
Stefan Troschuetz16-Aug-06 12:46 
QuestionProcessMessage: preventing a method call Pin
VP7616-Aug-06 11:15
VP7616-Aug-06 11:15 
Questionuse varible as update properties Pin
ddpn4216-Aug-06 8:58
ddpn4216-Aug-06 8:58 
AnswerRe: use varible as update properties Pin
beatles169216-Aug-06 9:08
beatles169216-Aug-06 9:08 
GeneralRe: use varible as update properties Pin
ddpn4217-Aug-06 2:29
ddpn4217-Aug-06 2:29 
GeneralRe: use varible as update properties Pin
beatles169217-Aug-06 11:57
beatles169217-Aug-06 11:57 
AnswerRe: use varible as update properties [modified] Pin
User 665816-Aug-06 9:09
User 665816-Aug-06 9:09 
QuestionRefference to dll causes app to hang Pin
The Un16-Aug-06 8:25
The Un16-Aug-06 8:25 
AnswerRe: Refference to dll causes app to hang Pin
beatles169216-Aug-06 9:14
beatles169216-Aug-06 9:14 
GeneralRe: Refference to dll causes app to hang Pin
The Un16-Aug-06 9:29
The Un16-Aug-06 9:29 
AnswerRe: Refference to dll causes app to hang Pin
The Un16-Aug-06 11:09
The Un16-Aug-06 11:09 
QuestionTerminal Server - Keyboard Shortcuts not working Pin
Paul Brower16-Aug-06 7:55
Paul Brower16-Aug-06 7:55 
AnswerRe: Terminal Server - Keyboard Shortcuts not working Pin
unclepaul16-Aug-06 12:09
unclepaul16-Aug-06 12:09 
QuestionForm based post with file and data -- once more Pin
Green Goblin16-Aug-06 6:25
Green Goblin16-Aug-06 6:25 
AnswerRe: Form based post with file and data -- once more Pin
Guffa16-Aug-06 6:40
Guffa16-Aug-06 6:40 

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.