History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RSRP-46215
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Alexander Zverev
Reporter: Igor Abade
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
ReSharper

"Use string.Format" - Detect parameterized ToString() usage and transfer argumen to format string

Created: 25 Jul 07 20:54   Updated: 17 Mar 08 13:14
Component/s: Context actions
Fix Version/s: Future Versions
Security Level: Everybody (All jira users)

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 505


 Description  « Hide
Consider the following code snippet:

int executionTimes = 1000;
DateTime finishTime = DateTime.Now;

string msg = "Execution details: " + executionTimes.ToString("#,000.00") + " times; finished " + finishTime.ToString("dd/MM/yyyy hh:mm");

When invoking the "Use string.Format" suggestion, it yields:

string.Format("Execution details: {0} times; finished {1}", executionTimes.ToString("#,000.00"), finishTime.ToString("dd/MM/yyyy hh:mm"))

When, in fact, I'd expect it to yield:

string.Format("Execution details: {0:#,000.00} times; finished {1:dd/MM/yyyy hh:mm}", executionTimes, finishTime)



 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.