473,398 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Building a C# library


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello all

I am using VS.NET 2003.

What I am doing apart from teaching myself C# is learning my way round
V.NET2003 also.

OK so I have a project, it's built and saved.
I also want to start my own collection of Classes that I will save up and
store for future use.

My questions are thus..

In making my new class library, do I just create a new Solution directory,
probably called something like,
MyName.ClassLibrary, then every time I create a class that I like, I just
put it in a class file, build it, add that file, built as it's own .dll now,
to that solution directory??

Also after there a few classes built as .dll's in that solution directory,
how do I then add a class .dll file to any new projects I am working on that
I might need to use it within?

Is it just a case of going to Solution Explorer, right clicking on
References/Add Reference, then going to Projects, and Browsing to the
Solution directory were my class built .dll files are, and adding it to the
References?

Then in my current project I can just use the key word, "using" in a way
similar to,

using blah = MyName.ClassLibrary.MyClass; // <-------is it best to put the
actual class .dll file also?

and then I can create objects of that class ??

If I am missing any steps out, or have got any steps wrong, any help with it
would be greatly appreciated thanks.

I think I have it down right, I am just not 100% sure about it.
Thanks in advance again :)

Player

- --
***********
I hear, and I forget.
I see, and I remember.
I do, and I understand.
- -- Confucius
************
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQA/AwUBQYexUy/z2sM4qf2WEQIW/wCg0RRqdee+732UQAKA1dAKubUjvlkAniGI
tKnQRZrtVCRkQ63SkyXB+H5i
=T/R4
-----END PGP SIGNATURE-----
Nov 16 '05 #1
1 1606
if you're building up a list of DLL's as part of one solution, then they are
separate "projects" in one "solution".

In your solution, right clikc in the Solution Explorer on the solution and
say add -> new project. Select the dll from there...

To refence this from your other projects, simply right click on the
"References" tag (again in the Solution Explorer) for that project and say
add reference. Then in the tabs select "Projects" in which you'll see your
class library, from which you'll able to reference your DLL project.

Don't reference the DLL file directly... This way you'll able to change
builds (debug/release) and have that build of the project correlate to the
class library of the same build. I.E Debug built app would point to a debug
build of a DLL, and clicking Release would build release app to release DLL.

good luck!

Dan.

"Player" <gu***@My.email.address.scum.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello all

I am using VS.NET 2003.

What I am doing apart from teaching myself C# is learning my way round
V.NET2003 also.

OK so I have a project, it's built and saved.
I also want to start my own collection of Classes that I will save up and
store for future use.

My questions are thus..

In making my new class library, do I just create a new Solution directory,
probably called something like,
MyName.ClassLibrary, then every time I create a class that I like, I just
put it in a class file, build it, add that file, built as it's own .dll
now,
to that solution directory??

Also after there a few classes built as .dll's in that solution directory,
how do I then add a class .dll file to any new projects I am working on
that
I might need to use it within?

Is it just a case of going to Solution Explorer, right clicking on
References/Add Reference, then going to Projects, and Browsing to the
Solution directory were my class built .dll files are, and adding it to
the
References?

Then in my current project I can just use the key word, "using" in a way
similar to,

using blah = MyName.ClassLibrary.MyClass; // <-------is it best to put
the
actual class .dll file also?

and then I can create objects of that class ??

If I am missing any steps out, or have got any steps wrong, any help with
it
would be greatly appreciated thanks.

I think I have it down right, I am just not 100% sure about it.
Thanks in advance again :)

Player

- --
***********
I hear, and I forget.
I see, and I remember.
I do, and I understand.
- -- Confucius
************
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQA/AwUBQYexUy/z2sM4qf2WEQIW/wCg0RRqdee+732UQAKA1dAKubUjvlkAniGI
tKnQRZrtVCRkQ63SkyXB+H5i
=T/R4
-----END PGP SIGNATURE-----

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rob Dijkshoorn | last post by:
Hi All, I have some problems building the python modules, most notably Tkinter, on AIX 5.1. Can anyone be of any assistance? Thanks, Rob This is what the compiler spits out:
7
by: Erik Johnson | last post by:
I am trying to upgrade my Python installation. After downloading sources and building Python 2.3.4, I am unable to use the command history editing feature in the interactive interpreter (where the...
0
by: Samuel M. Smith | last post by:
I can build python 2.4.2 from source on the embedded linux box when I nfs mount and boot a full debian distribution. The embedded box also has stripped down linux distribution in onboard flash....
17
by: Nick | last post by:
I am doing some research into building web applications using Object Oriented techniques. I have found the excellent patterns section on the MSDN site, but other than that I cannot find any good,...
3
by: Arjen | last post by:
Hello, Are the ASP.NET 2.0 "Building Block's" the same this as the Enterprise Library Application Blocks? Thanks! Arjen
2
by: tony | last post by:
Hello!! I use VS 2003 and C# for all class library except MeltPracCommon.dll which is C++.NET The problem is that I get these warnings when building the exe file and use my class libraries....
3
by: tony | last post by:
Hello!! I use VS 2003 and C# for all class library except MeltPracCommon.dll which is C++.NET The problem is that I get these warnings when building the exe file and use my class libraries....
2
by: Gawel | last post by:
Hajo, I have soulutin with 7 library projects and 2 web projects. When I change something in one of the libraries and hit F5 it takes literally 1-2 minutes to start an application. I've...
4
by: Arnaud Delobelle | last post by:
Hi fellow python enthusiasts. Having recently acquired a MacBook Pro (Intel Core 2 Duo) which comes with python2.5, I have been installing some modules that I need (PIL, psycopg2, PyXML ...). ...
12
by: Ludwig | last post by:
Hi all, we are building our own class library framework, with stuff in it that can be used in various projects at various clients. Initially we had 4 assemblies with everything in it. Of...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.