Best way to pass Array in and out of Custom Control?

G

Guest

Hello,

What is the best way to pass a 1D array of numbers in (and out) of a
control? I've been looking at the property wizard and don't see an option for
arrays?

The idea is to make something like a graph control which graphs an array of
1D numbers. When I pass the numbers into the control, I want the control to
update the graph. Or, another example is a simple control which displays the
Mean, Min, and Max of a 1D array. I want to pass an array of numbers into the
control then calculate the corresponding statistical values and display them
in 3 simple text boxes.

Any input is greatly appreciated.

Thanks,
craig
 
J

Jianwei Sun

How about this:
public class NumberArrayClass
{
private int[] _numerArray;

public NumberArrayClass()
{
_numerArray=null;
}

public int[] NumberArray
{
get
{
return _numerArray;
}
set
{
_numerArray=value;
}
}
}

HTH
 

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