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

How to Share webservice object to all user

How to fix error Msg 1801, Level 16, State 3, Line 1