Methods (Exercise) – Learn C#

This is an exercise for this YouTube video.

Happy learning and good luck!

 

What return type do you use when you don't want the method to return anything?
You can make an expression bodied method by using
You can create a method overload by

 

Assignment: Write a method which will add two integers together.

 

 

Click to see the answer

 

 

 

Assignment: Create a method which will be able to either add or subtract two numbers.

 

 

Click to see the answer

 

 

 

 

Leave a comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.


Development made simple

Your success is our success. If you have any questions, let us know.

Copyright 2017 - 2018 Reso Coder © All Rights Reserved