c# - Why not have an array with a negative number as index? -
c# arrays, why not have array negative number index? situation useful; fast algorithm in special type of sorting. 2 questions: 1) why not? 2) efficient workaround?
you can implement own class indexer. example:
public class myclass { public string this[int index] { { // ... } set { // ... } } }
where string
return type example.
Comments
Post a Comment