I writen method which multiply 2 Matrix:
[WebMethod]
public void MultiplyMatrix(double[,] _A,double[,] _B,int _n,int _m,int _r, out double[,] C)
{
int n, m, r;
n = _n;
m = _m;
r = _r;
double[,] A = new double[n,m];
double[,] B = new double[m,r];
C = new double[n,r];
A = _A;
B = _B;
try
{
for (int i = 0; i < n; i++)
{
for (int j = 0; j < r; j++)
{
for (int k = 0; k < m; k++)
{
C[i, j] += A[i, k] * B[k, j];
}
}
}
}
catch(IndexOutOfRangeException){}
}
and I wonder that in method MultiplyMatrix should be parameters out double[,] C or maybe I make a mistake?
thanks for any sugestion:)
If you are just returning one thing return a value.
i.e.: