I have C# error when calling:
string.Format(format:"abbccc", 1,22);
The error is “Named argument specifications must appear after all fixed arguments have been specified”
How can I fix this?
[Edit]
I prefer to use named parameters.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to specify the name of the format argument, you have to specify the name of the following argument also:
That’s not very useful, as the names “arg0” and “arg1” doesn’t say anything at all about the arguments.
Also, there are only overloads up to “arg2”, so if you have more arguments, you have to put them in an array to name the argument:
You can simply skip naming the arguments: