Alexander Schuc
crazy-weasel
Dann nimm eine Membervariable, anstatt der lokalen Variable in der Methode. Ähnlich der "doRandom"-Variable aus meinem Beispiel, nur halt anderer Datentyp (Integer).
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
using System;
public class MyClass
{
readonly int myRandomNumber;
public static void Main()
{
new MyClass();
}
public MyClass()
{
Random rdm = new Random((int)DateTime.Now.Ticks);
myRandomNumber = rdm.Next();
}
}