Unknown at index 0SensorSpeed not SensorSpeedsVS bug #735655
This should maybe go into a wiki or the contributing.md
Yeah, i want to rev on it here and bring it into the contributing area probably.
Prefer comparisons using == over is when checking for null, as you mentioned in #616 review
Another question which might be best answered at a project level: should we prefer default over SampleEnum.Unknown? If all enums are supposed to have Unknown as default value we can use default for brevity.
@Mrnikbobjeff i'm not sure I understand. You want to use Default instead of Unknown? General API guidance from the .NET team has been use Unknown, though sometimes it might make sense to also have a Default.
@Redth I was not specific enough in my previous post. My question was given an enum SampleEnum {Unknown = 0, Test = 1} and a function f() which returns a SampleEnum value, should/can we use "return default;" instead of explicitely returning SampleEnum.Unkown
In theory yes, but as we were reviewing some code changes for this, we had decided that returning Unknown explicitly was more readable to most people in code.
I would love to see some guidelines regarding Exceptions. AFAIK we still don't have a common Exception for runtime errors such as discussed in #457 - This might come up in bluetooth and contacts and should generally be clarified so that future PR's can conform to that :)
We have a whole issue for that #19 馃槃
This is now in: https://github.com/xamarin/Essentials/pull/692
Most helpful comment
Prefer comparisons using == over is when checking for null, as you mentioned in #616 review