473,847 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ClassLib rary, 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.ClassLib rary.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+732U QAKA1dAKubUjvlk AniGI
tKnQRZrtVCRkQ63 SkyXB+H5i
=T/R4
-----END PGP SIGNATURE-----
Nov 16 '05 #1
1 1627
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.c om> wrote in message
news:%2******** ********@TK2MSF TNGP14.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.ClassLib rary, 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.ClassLib rary.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+732U QAKA1dAKubUjvlk AniGI
tKnQRZrtVCRkQ63 SkyXB+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
1677
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
2427
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 up-arrow would previously give you the last command line to edit, it now just prints "^[[A".) This is a feature I use often, and it kinda nullifies that warm fuzzy feeling you get when things are otherwise working as expected. Python 2.2.2 was...
0
1778
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. My goal is to run python from the stripped down linux in onboard flash. I can successfully install python to the onboard flash when booted to the nfs version by using make install with $DESTDIR set to the onboard flash mounted directory
17
2079
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, concrete examples. I know Microsoft are really pushing OO with the .NET Framework and C#, but for web stuff I am finding good examples sparse. Can anyone offer some links to articles, whitepapers, sites etc that maybe give a good overview of the...
3
1567
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
1771
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. See below for a detail description. Preparing resources...
3
1753
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. See below for a detail description. Preparing resources...
2
2401
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 noticed - looking at output window - that huge time of building takes web site validation. The output is like below:
4
3156
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 ...). The problem is that compiles all the binaries to universal files for i386 and ppc32, but not x86_64 or ppc64. It does not appear to be a problem when running scripts from the shell (as python seems to run as a 32 bits problems), but it is a...
12
2596
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 course, when project A only needs one class, it gets everything in the assembly also; and we don't want that. Now we create an assembly for each control or main functionality, so
0
9892
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9734
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10347
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7888
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7061
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5915
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4540
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3168
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.