No, It is Immpossible. The default value must be a compile time constant. The default value will be inserted into the caller, not the callee. Your code will be a problem if the caller does not have access to the methods used to create your default value.
But you can use simple overloads:
public void foo(char[] bar) { } public void foo() { foo(new char[]{'a'}); }
CodesInChaos
source share