Bug 15377 - Feature: CodeIssue about redundant params in WriteLine("{0}{1}", params obj[]) signatures
Summary: Feature: CodeIssue about redundant params in WriteLine("{0}{1}", params obj[]...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: All All
: Normal enhancement
Target Milestone: master
Assignee: Mike Krüger
Depends on:
Reported: 2013-10-14 06:29 UTC by Andres G. Aragoneses
Modified: 2013-10-15 02:21 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Andres G. Aragoneses 2013-10-14 06:29:04 UTC
Steps to reproduce:
1. Write the following method in a class:
		void Foo () {
			Console.WriteLine ("hello {0}: {1} {2}", "0", "1");
			Console.WriteLine ("hello {0}: {1}", "0", "1", "2");

Current results:
For the first WriteLine call, a code-issue is raised.

Expected results:
It should also advice about the second WriteLine, although with a lower severity level. (Same severity level as arguments passed to a method that are not used.)
Comment 1 Mike Krüger 2013-10-14 07:36:37 UTC
We have already an issue for that 
(Argument not used in format string -> marks the "2" as redundant)
Comment 2 Andres G. Aragoneses 2013-10-15 02:21:32 UTC
Oh, sorry, I thought I was, but I wasn't running master branch!