Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
C# params keyword ⚙️
Play lesson

C# tutorial for beginners 🎵 - C# params keyword ⚙️

5.0 (6)
48 learners

What you'll learn

This course includes

  • 4 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

C# params keyword tutorial example explained #C# #params #keyword using System; namespace MyFirstProgram { class Program { static void Main(string[] args) { //params keyword = a method parameter that takes a variable number of arguments. // The parameter type must be a single - dimensional array double total = CheckOut(3.99, 5.75, 15, 1.00, 10.25); Console.WriteLine(total); Console.ReadKey(); } static double CheckOut(params double[] prices) { double total = 0; foreach (double price in prices) { total += price; } return total; } } }

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere