a problem with variable number of parameters.

N

NA_AB

hey all, this seems to be working fine,

int Method(params int[] numbers)
{
int count = 0;
foreach (int n in numbers)
{
count++;
}
return count;
}

but,


when am trying to build a com addin to excel, and am trying to invoke this
function using the excel formula way i.e., as =Method(10,20,30) or
=Method(1,2,3,4,5,6) and so on... I'm always getting a '#VALUE!'

WHAT COULD BE THE PROBLEM?! thanks in advance people... any help shall be
considered very thankful.. :)
 

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

Top