ghkweon / dwscript

Automatically exported from code.google.com/p/dwscript
0 stars 0 forks source link

Array.Contains would be nice #476

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Sure, there's already IndexOf as a "magic method" for arrays that can be used 
for this purpose, but "myArray.Contains(value)" is simpler and more clearly 
communicates the intent of the code than "myArray.IndexOf(value) <> -1".

Original issue reported on code.google.com by masonwhe...@gmail.com on 8 Jul 2014 at 11:41

GoogleCodeExporter commented 8 years ago
Arrays already support something better: the "in" & "not in" operators :)

https://code.google.com/p/dwscript/wiki/DynamicArrays

Original comment by zar...@gmail.com on 9 Jul 2014 at 6:15