no boundary check ?

  • Thread starter Thread starter Boki
  • Start date Start date
B

Boki

Hi All,


I saw my code jump out the function call directly without throw a
boundary error....

no boundary check ?

string[] str_member_id = new string[100];

str_member_id[id_count] = "sth"; // exit directly without throw a msg
when id_cound=101;


Best regards,
Boki.
 
Boki said:
I saw my code jump out the function call directly without throw a
boundary error....

no boundary check ?

string[] str_member_id = new string[100];

str_member_id[id_count] = "sth"; // exit directly without throw a msg
when id_cound=101;

No, it will be throwing an IndexOutOfRangeException. If you have some
reason to believe this isn't happening, please post some code which
demonstrates it.
 
Boki said:
I saw my code jump out the function call directly without throw a
boundary error....
no boundary check ?
string[] str_member_id = new string[100];
str_member_id[id_count] = "sth"; // exit directly without throw a msg
when id_cound=101;

No, it will be throwing an IndexOutOfRangeException. If you have some
reason to believe this isn't happening, please post some code which
demonstrates it.

No, I didn't catch it. just assume code will stop and let me know it.
Thanks.

Boki.
 
Boki said:
[...]
No, I didn't catch it. just assume code will stop and let me know it.
Thanks.

Perhaps you've run your application outside without your debugger or
started a release build ?

Andre
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top