[Mono-bugs] [Bug 420183] New: extension methods not always resolved
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Aug 25 17:16:15 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=420183
Summary: extension methods not always resolved
Product: Mono: Compilers
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: wasabi at larvalstage.net
QAContact: mono-bugs at lists.ximian.com
Found By: ---
I think the subject is accurate, but I don't have a test case yet.
I have a class named String in a file named String.cs. It has two extension
methods:
using System;
namespace ISIS.Util
{
public static class String
{
public static string FromStart(this string self, int length)
{
return self.Substring(0, length);
}
public static string FromEnd(this string self, int length)
{
return self.Substring(self.Length - length, length);
}
}
}
Neither of these extension methods seem to be available from Mono. 'using
System' is specied at the top of the files attempting to use the methods. Same
code works on MS.Net.
I also have an instance of an extension method in a class named DataReaderRocks
which should apply to types of IDataReader, which is similarily not considered.
I'm not sure why. Works in MS.Net.
--
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