Witam,
Jak mogę wylosować liczby z tablicy, która jest zapełniona i wpisać to do nowej zmiennej.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Windows.Forms;
namespace ObjectMoving
{
public partial class FormView : Form
{
Random Rand= new Random();
private int[] tablica= new int[18];
int Zna_X,Zna_Y;
public FormView()
{
InitializeComponent();
for (int j = 0; j < 18; j++)
{
tablica[j] = j + 1 * 15 + 30;
}
int liczba = Rand.Next(tablica[18]);
int liczba1 = Rand.Next(tablica[18]);
if (liczba % 15 == 0)
{
Zna_X = liczba;
}
if (liczba1 % 15 == 0)
{
Zna_Y = liczba1;
}
}
}
}
Oraz jak zatrzymać funkcje Random