[Mono-bugs] [Bug 406889] New: New rule: Prefer char over string for string methods at least

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jul 7 15:01:28 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=406889


           Summary: New rule: Prefer char over string for string methods at
                    least
           Product: Mono: Tools
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Gendarme
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: msafar at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


It's well known that char is faster than string of length 1.

This rule should detect whether it's possible to use char version of string.
Many examples can be found inside String class.

e.g.

Prefer

string.IndexOf ('x');

over

string.IndexOf ("x");


I believe this rule can be pretty generic if possible, but at least String
methods are a must.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list