 
  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
What are mixed arrays in C#?
Mixed arrays are a combination of multi-dimension arrays and jagged arrays.
Note − The mixed arrays type is obsolete now since .NET 4.0 update removed it.
Let us see how you can declare a mixed array −
var x = new object[] {89,45,"jacob",9.8} We can also set them as −
var x = new object[] {87, 33,"tim",6.7, new List<string>() {"football","tennis","squash",“cricket”} } Since, mixed arrays are obslete now. For the same work, use the List collection. Here, we have set int and string in the list −
Tuple<int, string> tuple = new Tuple<int, string>(60, "John");
The same example is displayed below:
using System; using System.Collections.Generic; class Program {    static void Main() {       // Initializing collections       Tuple tuple = new Tuple(99, "Jack");       if (t.Item1 == 99) {          Console.WriteLine(tuple.Item1);       }    } }Advertisements
 