How to execute one time initialisation


(Vapeurz) #1

Hi, I’ve been working with Processing previously, and just started learning C#.
In Processing, we have

void setup()
    //code in here only execute once, so that I can initialise my class, such as below
    int a = 0;
    MyClass class a;

void draw()
    //here the code run continuously.

is there a same way as the “void setup*()” to initialise my variables and classes in c#?