I have projekt work " Advanced calculator " that the user can calculate derivative .

I've been thinking about an array like this .

2 forms

the first one contains textbox and button .

the other on label .

the user have to specify the number of how many products in the function by typing in the textbox in the first form . then the button send this number to the other form .

now when the secund form recesivs this numer , it will creat an array of length [ number from the fist form ]

and then run foreach kod .

f(x) = X^n . will be n*X^n-1 .

så the number will determine how many X^n . so foreach( ( X^n ) in array ) derivative is n*X^n-1 .

I do not know if im thinking right.

when i use this in console application

int [] r = new int [10] ; for ( i= 0 ; i < r.Length; i=i+1) { console.writeline (r[i]) ; }

i get output 1, 2, 3 ..... 9

but when i use it in Form applicatoin i got the sum of the number .

This post has been edited by **JackOfAllTrades**: 12 March 2011 - 05:42 AM

Reason for edit:: Added code tags