 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Set tuple as a method parameter in C#
Firstly, set a tuple
var tuple = Tuple.Create(100, 200, 300);
Now, pass the tuple as a method parameter −
Show(tuple);
Here’s our method.
static void Show(Tuple<int,int,int> tuple)
Now call the tuple values one by one as shown below −
Example
using System; public class Program {    public static void Main() {       var tuple = Tuple.Create(100, 200, 300);       Show(tuple);    }    static void Show(Tuple<int,int,int> tuple) {       Console.WriteLine(tuple.Item1);       Console.WriteLine(tuple.Item2);       Console.WriteLine(tuple.Item3);    } }  Output
100 200 300
Advertisements
 