I have just wrote how i use 'MainModule' in most cases of my projects.
Unfortunately (or fortunately?) i have no clients who have multi-
module assemblies in their projects..
The main reason is to access quickly main module - the module that has
manifest. If there were no 'MainModule', u'd enumerate modules and
search for it manually - of course, in more general case - in the case
of multi-module assembly

On 10 ноя, 19:27, Konstantin Zertsekel <[email protected]> wrote:
> > Because in most cases u will simply use MainModule instead of
> > enumerating Modules. And this code will work in, let's say, 95% of
> > cases.
>
> That's exactly the question - why write code that does not work in 5% of
> cases? It is evil.
> If that is only the reason for the 'MainModule' to be (and I hope this is
> the *only* reason), then I'll use 'AssebmlyDefinition.Modules' always.
> So, is it the *only* reason for 'MainModule' to be born?

-- 
--
mono-cecil

Reply via email to