I don't think so. I guess the reason is that inline methods can have types that non-inline methods don't support (e.g. argument types with member constraints).

The problem with inline methods is that you can only make use of other members in the class if these members are accessible from where the inline method is called. This is probably why you want a non-inline version for external users. (If inline methods weren't inlined in debug builds [when possible] that would also help debugging in many cases.)

There are two ugly workarounds: 1) use an inline method within the assembly and define a non-inline, externally-facing method in terms of the inline method (e.g. use a lower case inlined "lengthSquared" internally), or 2) make private members public but prepend them with underscores to signal their private status.

By on 5/27/2008 12:30 AM ()

Hi TP,

No, that's not possible.

Kind regards

don

By on 5/27/2008 12:25 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper