Is it possible to prevent compiler warning caused by a static factory method returning an instance of an obsolete class?
For example if an instance of an obsolete class (Foo) is created through a static method (Create) a compiler warning is caused by the factory method.
<Obsolete()> _
Public Class Foo
Public Shared Function Create() As Foo
' Instantiate and return
End Function
End Class
In C# the warning could be suppressed using "#pragma warning..." but I don't think that this exists within VB.Net. Migrating to C# is not an option due to business requirements.