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
Post a Comment