Tuples in C# PRO

Tuples were introduced in .NET 4.0. While arrays hold objects of the same type, tuples can hold objects of different types. The eight different generic Tuple classes are available for the purposes of having tuples with diferent number of types. Once a tuple was created the type of its fields cannot be changed. In a way, using a tuple is similar to using a value type.

The .NET 4.0 includes eight different generic Tuple classes and one static Tuple class that works as a factory for getting tuples. Calling the Tuple.Create() static method we can get a new tuple.

The following video clips explain various aspects related to using tuples in our code. I have just completed to update my C# Fundamentals course at www.abelski.com. You can get the source code as well as more training material about tuples in C# at www.abelski.com.

Share:

banner for the css playlist in hebrew life michael courses for programmers

The First Steps in CSS

Learn CSS using our our videos (in Hebrew) on the CSS (he) playlist on youtube. Do it now. Do it for free.

Good Trainers Collaborate with Others

It is always essential to keep an open mind and learn from others. This applies to everyone, including teachers and especially software development trainers. Software

The Beauty of Code

Coding is Art! Developing Code That Works is Simple. Develop Code with Style is a Challenge!

Update cookies preferences