declare function inline in unity3d

in javascript you can do this
cat=function(){};

is there a way to declare function inline using unity?
Or an alternative?

The reason is I want to use this with the unify script ExpandoObject to do something like this

cat=new ExpandoObject()
cat.meow=function(){dosomething}

Thanks,

Dan

You can’t create an anonymous function, but you can assign a function value by name to a variable:-

function DelegateFunc(pm: int) {
   // Do something...
}

function Start() {
   var func = DelegateFunc;
   func(3);
}