class MyGenericClass<T> where T : ICompareable
{
T[] data;
public AddData(T[] values)
{
data = values;
}
}
In my mainForm, I create 3 random numbers, and add them as values: 1 3 3, resulting in:
T[] data : [0]1
[1]3
[2]3
I want to be able to search for a specific value and have the number of times that value is present in the array returned to me.
How do I do that in C#?
This should work for you: