Create new function for an Argument. Possible?

Is something like this possible in c#(Snippet from Garry’s Mod Wiki):

concommand.Add( “commandname”, function( ply, cmd, args, str )
print( ply:Nick(), cmd )
PrintTable( args )
end )

I already have a console command system working but i want to make it a bit easier to add commands. My system uses Delegates and i’m guessing this is what i need to do it with again, i just don’t know how :frowning:

You could use a dictionary with a string key and a delegate value. You might need to make all of the delegates take the same parameter list for this to work. One thing to consider is passing in an object as a parameter. The object can then hold references to all of the other parameters needed.