Timeline for Data structure for grid with negative indeces
Current License: CC BY-SA 3.0
16 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 29, 2014 at 23:03 | vote | accept | The Secret Imbecile | ||
| May 29, 2014 at 0:10 | comment | added | Robert Harvey | @TheSecretImbecile Not if you don't know in advance how many items are going to be in the array. Anyway, it would be easy enough to change the lists to arrays. | |
| May 29, 2014 at 0:00 | comment | added | The Secret Imbecile | @RobertHarvey Why would you use a List over a 2d array for a grid? surely referencing each position would be easier with the array? | |
| May 28, 2014 at 19:49 | comment | added | Robert Harvey | @svick: Done. I would have accepted that as a suitable edit by someone else, but thanks for being polite. | |
| May 28, 2014 at 19:48 | history | edited | Robert Harvey | CC BY-SA 3.0 | deleted 206 characters in body |
| May 28, 2014 at 19:46 | comment | added | svick | Shouldn't that Activator note be removed now that the code doesn't use it? | |
| May 28, 2014 at 17:55 | history | edited | Robert Harvey | CC BY-SA 3.0 | deleted 93 characters in body |
| May 28, 2014 at 17:48 | comment | added | Robert Harvey | @DanLyons: I'm hobbled by the fact that my IDE is on a different computer than my Internet (for security reasons). | |
| May 28, 2014 at 17:47 | comment | added | Dan Lyons | Yeah, the declared type is coming from the type parameter on the class definition. I tossed it into a quick console project to confirm. The only change I had to make was replacing this(int index) with this[int index]. | |
| May 28, 2014 at 17:43 | history | edited | Robert Harvey | CC BY-SA 3.0 | deleted 12 characters in body |
| May 28, 2014 at 17:42 | comment | added | Robert Harvey | @DanLyons: Are you sure? I don't think that compiles; the List<T> constructor expects a declared type, like string. I do think you're right about the casts, though. | |
| May 28, 2014 at 17:41 | comment | added | Dan Lyons | There's no need to use Activator. It is perfectly valid to use new List<T>(); within the constructor. The casts are unnecessary as well. | |
| May 28, 2014 at 1:49 | history | edited | Robert Harvey | CC BY-SA 3.0 | added 15 characters in body |
| May 27, 2014 at 23:34 | history | edited | Robert Harvey | CC BY-SA 3.0 | added 228 characters in body |
| May 27, 2014 at 23:24 | history | edited | Robert Harvey | CC BY-SA 3.0 | added 387 characters in body |
| May 27, 2014 at 23:02 | history | answered | Robert Harvey | CC BY-SA 3.0 |