C# 生成1-100的随机数

Random r = new Random();

int num = r.NextInteger(1,101);