we can declare anonymous datatype using var
var a=10;
declaring arrays using var
integer array
var a =new int[]{1,2,3,4,5}
console.writeline(a[2].tostring())
O/P
3
string array
var a=new string[]{"hi","hello"}
console.writeline(a[1].tostring())
O/P
hello
we can also copy methods into anonymous datatype also
ex:
func
Now we can copy this method into Anonymous
Var d= new { meth=methode1}
console.writeline(d.meth(1,2));
O/P
3