Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mono : is there a System.Tuple?

Tags:

c#

mono

f#

c#-to-f#

I am trying to do some interop between C# and F# in Mono. Is there a System.Tuple in Mono C#? I can see the one in Mono.CSharp, but that doesn't seem to be the same type as F# (a' * b'). So,

(a) Is there a System.Tuple in Mono C# or (b) Is there a cast between tuples in Mono C# and F#?

like image 480
Aidan Avatar asked Mar 17 '11 23:03

Aidan


People also ask

What is System tuple?

A tuple is a data structure that has a specific number and sequence of elements.

Is a namespace a tuple?

The Tuple class is part of the System namespace.

Are there tuples in C#?

The word "tuple" in C# refers to a data structure which may consist of multiple parts. This data structure may or may not be a dataset with multiple values. Tuples were first introduced with . NET framework 4.0, and they allow a maximum of 8 elements.

Is tuple reference type?

Tuple types are reference types. System. ValueTuple types are mutable.


1 Answers

Yes Mono supports a Tuple type. I know it's in 4.0 but I've seen comments of it's availability since version 2.6.

  • Tuple Documentation
like image 188
JaredPar Avatar answered Sep 28 '22 01:09

JaredPar