Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Tuple.Create method in C#
To create a tuple, use the Tuple.Create method.
Here we have set a tuple with a string and int −
var myTuple = Tuple.Create("marks", 100);
The following is an example that creates a tuple using Tuple.Create and displays the elements in a single line in C# −
Example
using System;
class Demo {
static void Main() {
var myTuple = Tuple.Create("marks", 100);
Console.WriteLine(myTuple);
}
}
Output
(marks, 100)
Advertisements
