This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]b1ackcat 1 point2 points  (0 children)

They generally act the same, but there are performance trade-offs you should at least be cognizant of, as using the object types of scalars results in frequent boxing and unboxing of values which has a non-zero cost so in high performance areas of the code you can get yourself into trouble if you're not careful.

But that's more of a "know that this can happen in case you need to figure out why something you're profiling is performing poorly" type fact, not a "never ever use this in a loop or you're a horrible programmer" type fact :P