• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

how pass part of array as parameter

can I pass part of array as parameter or new a sub array from a array without
copying data? thanks.

tony tan
0
tanfengkui
Asked:
tanfengkui
  • 2
1 Solution
 
adam923Commented:
no, you can't pass a sub-array without copying data
you could pass the array and the first and last indicies to the method and then the method could be programmed to just look at the subarray between those indicies
if you have an array of objects just go ahead and copy them, only the references will copy so it won't waste much space
0
 
funduraghuCommented:
Part of array cannot be passed to a method directly.
If u want a sub array, the required elements are needed to be copied onto a new array



0
 
adam923Commented:
did you say anything new in your "answer"?
i think not
kindly withdraw your "answer"
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now