Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
QuestionReport not load Pin
haleemasher1-Nov-09 18:59
haleemasher1-Nov-09 18:59 
AnswerRe: Report not load Pin
Christian Graus1-Nov-09 19:10
protectorChristian Graus1-Nov-09 19:10 
QuestionUsing .Equals on a generic type constrained by struct. Pin
CaptainSeeSharp1-Nov-09 15:45
CaptainSeeSharp1-Nov-09 15:45 
AnswerRe: Using .Equals on a generic type constrained by struct. Pin
Not Active1-Nov-09 17:08
mentorNot Active1-Nov-09 17:08 
AnswerRe: Using .Equals on a generic type constrained by struct. Pin
Christian Graus1-Nov-09 17:57
protectorChristian Graus1-Nov-09 17:57 
GeneralRe: Using .Equals on a generic type constrained by struct. Pin
CaptainSeeSharp1-Nov-09 18:07
CaptainSeeSharp1-Nov-09 18:07 
GeneralRe: Using .Equals on a generic type constrained by struct. Pin
Christian Graus1-Nov-09 18:39
protectorChristian Graus1-Nov-09 18:39 
AnswerRe: Using .Equals on a generic type constrained by struct. Pin
N a v a n e e t h1-Nov-09 22:33
N a v a n e e t h1-Nov-09 22:33 
Boxing will happen for both byte and enum. This is because you have constrained only on struct and not all structs have got a strongly typed Equals() method. So a compiler will be forced to call the Equals(object obj) method defined in the System.Object which will lead into boxing.

To avoid boxing here, you can constraint on IEquatable<T>. But this will not allow you to specify a enum as enums don't have IEquatable implemented.

CaptainSeeSharp wrote:
OR WILL THE OVERLOAD THAT BYTEDEFINES BE CALLED?


Call will go to byte's Equals(object obj) method as Object.Equals() is virtual and System.Byte has overridden it.

Smile | :)

Best wishes,
Navaneeth

QuestionZedGraph date help Pin
Aljaz1111-Nov-09 12:46
Aljaz1111-Nov-09 12:46 
AnswerRe: ZedGraph date help Pin
Christian Graus1-Nov-09 13:01
protectorChristian Graus1-Nov-09 13:01 
Questionled to rs232 [modified] Pin
_Q12_1-Nov-09 12:35
_Q12_1-Nov-09 12:35 
AnswerRe: led to rs232 Pin
Christian Graus1-Nov-09 12:42
protectorChristian Graus1-Nov-09 12:42 
GeneralRe: led to rs232 Pin
_Q12_1-Nov-09 12:56
_Q12_1-Nov-09 12:56 
GeneralRe: led to rs232 Pin
Christian Graus1-Nov-09 13:02
protectorChristian Graus1-Nov-09 13:02 
GeneralRe: led to rs232 Pin
_Q12_1-Nov-09 13:10
_Q12_1-Nov-09 13:10 
GeneralRe: led to rs232 Pin
Christian Graus1-Nov-09 13:33
protectorChristian Graus1-Nov-09 13:33 
AnswerRe: led to rs232 Pin
Alan N1-Nov-09 13:25
Alan N1-Nov-09 13:25 
AnswerRe: led to rs232 Pin
Luc Pattyn1-Nov-09 13:28
sitebuilderLuc Pattyn1-Nov-09 13:28 
GeneralRe: led to rs232 Pin
_Q12_1-Nov-09 13:53
_Q12_1-Nov-09 13:53 
GeneralRe: led to rs232 Pin
Luc Pattyn1-Nov-09 14:15
sitebuilderLuc Pattyn1-Nov-09 14:15 
GeneralRe: led to rs232 Pin
_Q12_1-Nov-09 14:43
_Q12_1-Nov-09 14:43 
GeneralRe: led to rs232 Pin
_Q12_1-Nov-09 16:18
_Q12_1-Nov-09 16:18 
Questionmain form is not activated Pin
Maddie from Dartford1-Nov-09 12:05
Maddie from Dartford1-Nov-09 12:05 
AnswerRe: main form is not activated Pin
Christian Graus1-Nov-09 12:07
protectorChristian Graus1-Nov-09 12:07 
QuestionMaking custom control subscribe to external event ? Need Approach advise... Pin
idan_bismut1-Nov-09 9:30
idan_bismut1-Nov-09 9:30 

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.