Skip to content

Latest commit

 

History

History
114 lines (99 loc) · 4.37 KB

File metadata and controls

114 lines (99 loc) · 4.37 KB

Functions

Functions are called like so:

functionName(arg0, arg1)

You can specify the generic type of a function like so (this isn't needed most of the time as the compiler can usually infer the type from the types of the arguments):

someGenericFunction<theGenericType>(arg0, arg1)

Ref and out arguments need to be prefixed with the ref/out keyword.

someFunc(ref arg0, out arg1)

Out arguments can be used with expression variable decleration (the variable is declared in the argument) and discards (the result of the out variable is ignored)

someFunc(out typeOfArg0 arg0, out _)

If the inline modifier is applied (or the function is only called 1 time), the call to the function gets replaced by the code of the function.

Contents