Additional parameter C # 4

Is the implementation of additional C # 4 parameters the same as VB.NET, is the optional parameter compiled on the call site (may cause versioning problems)?

+1
source share
2 answers
+4
source

According to SamNg, C # parameters are compiled by default on the call site , similar to the default parameters in C ++.

Yes, this will cause version issues. However, optional parameters should be used where it makes sense. In many cases, this means passing null or the default class to a method or constructor.

+3
source

All Articles