Do I need a reference to a file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If have a line of code which does a new ObjectX, but I ensure this code never
gets executed, I.e I have an if statement around it, I find that I get an
error at run time that the dll for Object X cannot be found - i.e it still
looks for its dll at run time even though this line of code is never
executed. Just checking - Is this standard behaviour with DotNet? I believe
so but just want to check.
What DotNet seems to do is resolve its references on a function by function
basis so as soon as it encounters my function with new ObjectX, it complians
that it can't find the ObjectX dll even though this line will never be
executed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top