I need your help.
i would like to display a random number between two different value of an url parameters.
This is the code. It doesn't work
public class RandomIntController : ApiController
public double Get()
double min = Request.QueryString("min");
double max = Request.QueryString("max");
min = 1;
max = 100;
Random number = new Random();
int min = (int)Request.QueryString["min"]; int max = (int)Request.QueryString["max"]; Random number = new Random(); return number.Next(min, max);
QueryString is a key value pair, not method. use
 instead of
(). Also pass
max as a parameter to
Next method as in code.