Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- public static IEnumerable<int> GetRandomNumbers(int from, int to, int take)
- {
- return Enumerable.Range(from, (to - from) + 1)
- .OrderBy(num => Guid.NewGuid())
- .Take(take);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement