>>> [...]
>>> Monkey monkey = Monkey (); }
[quoted text clipped - 5 lines]
>
> Besides that, of course. It's a typo.
Well, it's the only thing in your original post that seemed wrong.
> What i've done is that i referenced an EXE file, which
> in my (possibly ignorant) opinion is a strange thing to
> do. Is it?
Yes, I'd say "strange". But I don't know that it's not allowed. There's
not much difference between a DLL and an EXE, other than the way the OS
loads them. I don't know that those differences would lead to some
compiler error.
That said, first thing you should probably try is changing the EXE project
to be a DLL instead, then reference that DLL.
If that doesn't fix the problem, you'll need to be more specific about
what's not working. For best results, you need to come up with a
concise-but-complete code sample that reliably demonstrates the problem.
In this case, that probably means a pair of minimal projects, one that
references the other. Show us the projects, describe precisely how you're
referencing one from the other (you should be adding one as a reference to
the other, and if you want to use a class in that one without qualifying
it, you'll have to add the namespace using directive in the other to
support that). And finally, and perhaps most importantly, be very
specific about the error you're getting. What line of the posted code
causes the error and what is the _exact_ text of the error?
Pete
K Viltersten - 24 Mar 2008 21:48 GMT
>> What i've done is that i referenced an EXE file, which
>> in my (possibly ignorant) opinion is a strange thing to
[quoted text clipped - 4 lines]
>loads them. I don't know that those differences would lead to some
>compiler error.
I was unclear, i think. I _GOT_ it to work. No apparent
errors there. My problem is that i fear that i did
something seemingly working but going to bite me in
the lower back later on, since i didn't use DLL, only
EXE. So, if you can't see anything wrong with making
the program run _THAT_ way, we have no problem. :)
Thanks and sorry for not being clear.
--
Regards
Konrad Viltersten
--------------------------------
sleep - a substitute for coffee for the poor
ambition - lack of sense to be lazy
Jon Skeet [C# MVP] - 24 Mar 2008 22:47 GMT
<snip>
> I was unclear, i think. I _GOT_ it to work. No apparent
> errors there. My problem is that i fear that i did
> something seemingly working but going to bite me in
> the lower back later on, since i didn't use DLL, only
> EXE. So, if you can't see anything wrong with making
> the program run _THAT_ way, we have no problem. :)
Adding a reference to an executable is fine, in my view. Aside from
anything else, it's the only way of writing unit tests against
executables, unless you make the executable *just* a single class which
immediately calls into a DLL.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk
Peter Duniho - 24 Mar 2008 23:50 GMT
> I was unclear, i think. I _GOT_ it to work.
Ah, okay. No, I don't think you made that clear. And yes, assuming it
works, I don't see anything fundamentally wrong with referencing an EXE.
Sounds like you're "good to go!" :)
Pete