As you are trying to do, it is always a good practice to move common
functionality away from the application so that it can be shared.
Now some clarification regarding your "class" vs. "dll" question. A DLL is
a container for classes, therefore when you create a class, it is compiled
into a DLL/Assembly. You can simply create another "library" project and
move your classes/code from the console project. Once done, then yes, you
have to add a reference to that assembly in your console application.
As to whether you use a "using" statement depends on your namespaces. If
your choose to give your library code a different namespace from your
application (which you will probably want to do since this code will be
shared) then you will also need to add a "using"directive in any application
file that references your utility classes.
"Paolo" <Pa***@discussions.microsoft.comwrote in message
news:96**********************************@microsof t.com...
Learning C# using Console applications. I want to develop some utility
functions (wrapping up some of the Console class methods) so that I can
have
them available for any program that I write.
If I create a DLL do I include these functions by adding it as a reference
in my projects?
If I create a Class do I add the 'using' directive to include them?
Are there any pros/cons with respect to either approach?
Thanks