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

Shamil Salakhetdinov shamil at smsconsulting.spb.ru
Wed Dec 9 14:59:21 CST 2009

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 
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

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.


-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Wednesday, December 09, 2009 6:49 PM
Subject: [dba-VB] C# - Thoughts on my methods

As a consultant in a home office I work in total isolation except for this
email group.  So I need 
your input, to keep me sane and to keep me on the right path.  I would like
your thoughts on what I 
am doing and what I am intending to do.

As you know, I have "the database from hell", for which I am developing an
application to allow me 
to manipulate the various pieces from an application interface rather than
directly from stored 
procedures and the SSMS or from Access, which is what I have done to this
point.  With C# I am able 
to do more than I was able from Access, including getting back output
parameters from stored 
procedures.  So... my process so far.

First off, I am developing the overall application as a set of child
projects inside of the 
application.  The main application opens a form with a menu, and that menu
takes me to forms in the 
child projects to perform pieces of the application.  For example I have a
database backup project 
where I can backup and restore specific databases or groups of databases.  I
have an Accuzip project 
where I can export CSV files to and import resulting CSV files from the
external Accuzip program.  I 
have an Orders project where I can create and manipulate the orders I create
for the client.

Each child project is physically located underneath the main application
directory.  In order to 
reference (open) the forms in the child projects, I have to set a reference
to that project and I 
have to set a using statement in the form.  I still do not understand what
these two pieces do.  Why 
do I have to set a reference and a using?  I assume you cannot set a using
statement unless the 
project references the library (or project)?

I also don't understand why some objects in a referenced project class can
be seen but others 
cannot.  IOW I can use one class in a namespace as a type to dimension an
object, but another class 
in the same namespace is not visible, cannot be so used.

I don't understand a whole ton of things of this nature and I have to say
that the whole "break into 
projects" idea is turning out to be more work than it might be worth.

Any comments on this email will be much appreciated.

John W. Colby


__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4674 (20091209) __________

The message was checked by ESET NOD32 Antivirus.


More information about the dba-VB mailing list