It's keywords and etc. like dynamic that make C# so amazing! +100 reputation to whoever thought this keyword up.
Look what you can do with it, here's a great example (going to use it for network packets with serialization and packets of different types, except we don't have to use structs/classes :)... This code was created with the C# Console:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace test
{
class Program
{
static void Main(string[] args)
{
Object[] myObjectArray = new Object[] { (byte)5, 6, 7f, 8f };
dynamic[] test = myObjectArray;
myMethodWithSpecificParameters(test[0], test[1], test[2], test[3]);
}
static void myMethodWithSpecificParameters(byte b, int i, float f, float g)
{
Console.WriteLine(b.ToString());
Console.WriteLine(i.ToString());
Console.WriteLine(f.ToString());
Console.WriteLine(g.ToString());
Console.ReadLine();
}
}
}
The code above outputs (5 is byte, 6 is int, 7 is float, and 8 is float etc.):
5
6
7
8
Love it.