8

I have this

function(array<Object^>^ a)

How do I know the length of this array? Like C++, the size has to come with the function?

Thanks,

1
  • 5
    int i = a->Length; Does it work? Commented Apr 15, 2011 at 23:34

2 Answers 2

7

Function in your case:

function(array<Object^>^ a) {
    auto len = a->Length
}
Sign up to request clarification or add additional context in comments.

Comments

3

Remember that All of you classes are from the .net library so in the general case you can allays looks at the generic .net documentation. Here is the array class docs.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.