Named parameters


i have method  public void check(int x,string y, params object [] values ){ //..}  ,my problem how should call method using named parameters.

e.g. this.check(x:10,y:"this string ", ???)

would need name values params array?


yes, positional arguments cannot follow named arguments, , params parameter filled last arguments. therefore, must either name array argument or use no named argument @ all.


Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'