What is the difference benween int and NSNumber? Is NSNumber an analog of th object type in C#?
Tell me please in what cases it would be better to use NSInteger type and in what cases NSNumber*?
I'm not a C# guy, but from what I just read the "value types" (I call them primitives) are all aliased to structs in the System class. Primitives will be autoboxed and unboxed to these structs as context warrants. Java behaves this way, too, having wrappers for primitives to/from which it will autobox. In Objective-C NSNumber wraps just about any primitive (no pointers, I believe), but it's manual unlike the other two languages discussed here. Go through what gnasher729 suggested (maybe do so in C#, too) and see what you get.
-Lee
I think you could convince NSNumber to wrap a pointer if you cast the pointer to a primitive, but the result would be pretty useless for much of anything.
NSValue would probably be better, it knows what a pointer is.
-Lee
I think you could convince NSNumber to wrap a pointer if you cast the pointer to a primitive, but the result would be pretty useless for much of anything.