How to call non-trailing arguments as default argument in C#?
All Answers
total answers (1)
Severity: 8192
Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Filename: libraries/Filtered_db.php
Line Number: 23
total answers (1)
Consider the program:
Output
In above program, we are creating a class named EMP, it contains method setEmp() which has two optional or default argument (age,salary).
With E1 object, we are using salary parameter with colon( : ) operator to assign value. While with E2 object we are using a parameter with colon( : ) to set age of employee.