parameters

  1. A

    Default function parameter error

    Hi, I have searched the internet and cannot find anything on how to set a variable as a default parameter. Here is and example of the function: using System; int prePickedNum = 2; void MyFunction(int num = prePickedNum) { num += 1; } MyFunction(); The error is because I am trying to us a...
Top Bottom