DotNetShoutout - Stories tagged with Implicit
3
Shouts

C#/.NET Little Pitfalls: Implicit Zero To Enum Conversion

published 479 days, 15 hours, 14 minutes ago posted by BlackRabbitCoderBlackRabbitCoder 481 days, 12 hours, 49 minutes ago
Saturday, January 28, 2012 11:04:38 PM GMT Friday, January 27, 2012 1:29:56 AM GMT
Many times, we create overloaded methods or constructors to allow them to accept different kinds of data. Further, there are times that we may accept object when any value will do. This works well (aside from boxing/unboxing concerns for value types), but if you have an overload that accepts object and one that takes an enum, and you pass a constant expression of 0, where does it go? (more)
category: Web Dev | clicked: 21 | 1 comment | | source: www.blackrabbitcoder.net
tags: enum, .NET, conversion, C#, Implicit, Little Pitfalls