Tuesday, 20 August 2013

Return read-only 2-D array from class

Return read-only 2-D array from class

I have a class which contains a large array. I would like to make the
array private, but I need to read a lot of data from it, but make sure it
never be changed by anything outside of the class. Is there any way to
reference an array such that it can be read from, but not written to?

No comments:

Post a Comment