Skip to Content
Microsoft® Visual C#® 2005 Step by Step
book

Microsoft® Visual C#® 2005 Step by Step

by John Sharp
October 2005
Beginner content levelBeginner
592 pages
15h 2m
English
Microsoft Press
Content preview from Microsoft® Visual C#® 2005 Step by Step

Chapter 11. Understanding Parameter Arrays

After completing this chapter, you will be able to:

  • Write a method that can accept any number of arguments by using the params keyword.

  • Write a method that can accept any number of arguments of any type by using the params keyword in combination with the object type.

Parameter arays are useful if you want to write methods that can take variable numbers of arguments, possibly of different types, as parameters. If you are familiar with object-oriented concepts, you might well be grinding your teeth in frustration at this sentence. After all, the object-oriented approach to solving this problem is to define overloaded methods.

Overloading is the technical term for declaring two or more methods with the same ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® Visual C#® 2010 Step by Step

Microsoft® Visual C#® 2010 Step by Step

John Sharp
Professional C# 2005

Professional C# 2005

Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner, Allen Jones

Publisher Resources

ISBN: 0735621292Supplemental ContentErrata