[Mono-bugs] [Bug 656140] Add Overloads For Activity.SetResult and Activity.OnActivityResult Methods To Allow int For resultCode Parameter

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Nov 28 17:50:44 EST 2010


https://bugzilla.novell.com/show_bug.cgi?id=656140

https://bugzilla.novell.com/show_bug.cgi?id=656140#c3


--- Comment #3 from Dan Russell <danomania at gmail.com> 2010-11-28 14:50:43 PST ---
(In reply to comment #1)
> Can't you just cast the custom result codes to Result?  I'd prefer not to
> overload all this, and people seem to prefer the enum-based "standard" result
> codes to ints.

Although this is allowed, it is somewhat discouraged
(http://msdn.microsoft.com/en-us/library/cc138362.aspx).

"It is possible to assign any arbitrary integer value to meetingDay. For
example, this line of code does not produce an error: meetingDay = (Days) 42.
However, you should not do this because the implicit expectation is that an
enum variable will only hold one of the values defined by the enum. To assign
an arbitrary value to a variable of an enumeration type is to introduce a high
risk for errors."

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list