Piotr Szturmaj Wrote:

> Yes, I already used pointers but in other way:
> 
> uint[]* temp = &aa[5]; // copy uint[] reference
> 
> and it worked the same as using 'in'. However, I wasn't sure it's 
> completely safe.

Depends on what you mean by "safe." In your example if 5 is not a key then a 
Range violation will be thrown. In mine null will be returned.

Generally safety refers to not corrupting memory, and under that definition 
both of these are safe. Under the definition of "will not crash" no solution is 
safe.

Reply via email to