Hello
Well i want to declare an array as read only so once initialized we cant change it ..
like ReadOnly int [] arr ={1,2,3,4,5};
is it possible like this ???? if not please provide remedy
Thank you
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jul 15, 2013, 1:29 PM
For example:
VulpesPosted Jul 15, 2013, 2:28 PM
All you can do is to copy them back out to an array again and then sort that:
You could wrap the sorted array again in a ReadOnlyCollection but it would, of course, be a different object to the one that was used originally.
SUNIL GUTTAPosted Jul 15, 2013, 1:51 PM
TY