[dba-VB] C# - Thoughts on my methods

Charlotte Foust cfoust at infostatsystems.com
Wed Dec 9 15:11:49 CST 2009

I have to point out that it is exceptionally easy to create circular references when the projects are set up like this.  That's why in our apps we keep all the forms in a project, all the reports in a project, etc.  Of course, if we were using libraries rather than projects under the solution, it would be different.  But this way, it can get messy fast.

Charlotte Foust 

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Shamil Salakhetdinov
Sent: Wednesday, December 09, 2009 12:59 PM
To: 'Discussion concerning Visual Basic and related programming issues.'
Subject: Re: [dba-VB] C# - Thoughts on my methods

Hi John --

In fact this is easy (please correct me if I'm wrong):

- just reference your child projects from your main project and if you have (sub-)child projects then reference them from child projects; you can also reference child-child-(nephew) projects from parent projects etc... - just avoid having circular references...

All that is very similar to MS Access/VBA references but unlike in MS Access/VBA in .NET solutions this referencing always work without any glitches whatever size your solutions are - tens of projects, thousands of customer classes - no problems, no GPFs of Visual Studio (well, for ASP.NET and WPF solutions you can have GPFs but even in that case you'll have all your sources preserved).... 

I also don't understand why some objects in a referenced project class can be seen but others cannot.  
That should be your problem/issue: in VS2008 (Prof) you can always try to hint VS asking to "resolve" undefined class name, enum, global var - right click -> Resolve... - if it can't do that - you can always do that manually
- but it may be needed to have some custom classes "shuffled" between your projects...

the whole "break into
projects" idea is turning out to be more work than it might be worth.
John, it will pay itself back very quickly - just be patient - I'd guess (based on your software development experience) it will need max one week (in total) of your time to spend mastering that multi-project solutions - and when you're there - only outer space will be your limitation...

Just create a very simple sample solution with several projects and try to play with it setting references, moving custom classes from one project to the other, changing namespaces, and using directives... it's really easy - imagine hierarchical catalog where child entries can be referenced/accessed from parent ones, but where sibling entries aren't aware of each other...
(if only they do not inherit from the same parent entries...) 

Thank you.


More information about the dba-VB mailing list