প্রথমত, নীচে দেখানো হিসাবে একটি টিপল তৈরি করুন যা একটি পদ্ধতিকে কল করে।
var tuple = Show();
উপরের বিবৃতিটি নিম্নলিখিত পদ্ধতিকে কল করে -
static Tuple<int, int, int, int, int> Show()
পদ্ধতির অধীনে, নীচে দেখানো হিসাবে টিপল ফেরত দিন -
উদাহরণ
using System;
public class Demo {
public static void Main() {
var tuple = Show();
Console.WriteLine(tuple.Item1);
Console.WriteLine(tuple.Item2);
Console.WriteLine(tuple.Item3);
Console.WriteLine(tuple.Item4);
Console.WriteLine(tuple.Item5);
}
static Tuple<int, int, int, int, int> Show() {
return Tuple.Create(3, 5, 7, 9, 11);
}
} আউটপুট
3 5 7 9 11