[Mono-devel-list] Re: Can mono have methods(etc) not present MS implementation?

Robert Jordan robertj at gmx.net
Sat Jul 2 09:52:32 EDT 2005


> My question is simple, can we do something on a MS controlled namespace
> that is not part of the default implementation? Of course raising a mcs
> warning telling something like "This method will make your app not to
> run on MS.NET".
> This comes from a desire to introduce something in CodeDom, for instance
> for a Method I wish it to be able to contain more info than the default
> like SourceCodeLocation (line/column).
> What do you advice, to create a fork and keep patching it to stay sync
> with mono tree or use what I proposed?

If you just want to warn the consumer of the changed library about
the incompatibility: misuse the ObsoleteAttribute:

public void FooMethod()

If you want to build code that will run on both runtimes,
then never change the public interface. Introduce new members
only as "internal". Those menbers can be accessed using reflection.


More information about the Mono-devel-list mailing list