473,785 Members | 2,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do i build my own code 'library' (not .dll!)

Hi,

As I continue to explore C# , Visual Studio, and Programming in general
I am becoming increasingly hooked. I see myself definately studying and
learning c# with visual studio over the next year or two and am
frequently finding pieces of code i'd like to save for later use.

Is there a better way than just saving the code files in a folder with
a description of what each does?

Does visual studio have a way of building a code 'library' that I can
store all these pieces of code in for later use, and just search
through it and things like that?

Many thanks and apologies if this is a wacky question,

Gary.

Nov 30 '06 #1
3 1569
ga********@mywa y.com wrote:
>Is there a better way than just saving the code files in a folder with
a description of what each does?
What I've settled upon is this: (1) I keep all my completed projects
on the hard disk in a directory c:\comp, and from Visual Studio I use
Search>FindInFi les to scan every single one of them for any keywords.

But much more usefully, (2) When I've learnt something, I write it up
as a tutorial or example program. I've submitted some tutorials to
codeproject.com . More recently I've stored them on my own website in
wiki format. That's because other people *will* read them, use them,
find bugs, and submit bugfixes. Previously they'd email me the
bugfixes, or send them as comments to codeproject, but I was always
too busy to change anything. I'm hoping that now in wiki format it'll
be easier for me (and others) to make changes.

An important discipline for this: *ALWAYS* include a complete
compilable example program for download, so people can download it and
compile it and see if it really does work. Otherwise you'll get
frequent emails from people who don't understand the Visual Studio
project system. Also, a screenshot helps a lot.

I've found it useful to include the complete source code of my
programs on the web-pages themselves. That way, you can google-search
for particular library function-names and find them.

http://www.wischik.com/lu/Programmer
The reason for all of this is that unmaintained code will inevitably
die. Just saving your code snippets in a folder, you'll forget what
they did, they'll stop working in newer compilers, they'll get out of
date, and your archive will lose its value.

The other reason for doing this is that, by and large, I've learnt an
enormous amount from other people in newsgroups and websites. This is
my way of giving back to the community.

--
Lucian
Nov 30 '06 #2
Thank you that sounds like a good plan!
Lucian Wischik wrote:
ga********@mywa y.com wrote:
Is there a better way than just saving the code files in a folder with
a description of what each does?

What I've settled upon is this: (1) I keep all my completed projects
on the hard disk in a directory c:\comp, and from Visual Studio I use
Search>FindInFi les to scan every single one of them for any keywords.

But much more usefully, (2) When I've learnt something, I write it up
as a tutorial or example program. I've submitted some tutorials to
codeproject.com . More recently I've stored them on my own website in
wiki format. That's because other people *will* read them, use them,
find bugs, and submit bugfixes. Previously they'd email me the
bugfixes, or send them as comments to codeproject, but I was always
too busy to change anything. I'm hoping that now in wiki format it'll
be easier for me (and others) to make changes.

An important discipline for this: *ALWAYS* include a complete
compilable example program for download, so people can download it and
compile it and see if it really does work. Otherwise you'll get
frequent emails from people who don't understand the Visual Studio
project system. Also, a screenshot helps a lot.

I've found it useful to include the complete source code of my
programs on the web-pages themselves. That way, you can google-search
for particular library function-names and find them.

http://www.wischik.com/lu/Programmer
The reason for all of this is that unmaintained code will inevitably
die. Just saving your code snippets in a folder, you'll forget what
they did, they'll stop working in newer compilers, they'll get out of
date, and your archive will lose its value.

The other reason for doing this is that, by and large, I've learnt an
enormous amount from other people in newsgroups and websites. This is
my way of giving back to the community.

--
Lucian
Nov 30 '06 #3
I have created a 'class library' project, called 'My Library'. The
first file that is automatically created for me is called 'Class1.cs'.
In this file I have renamed the namespace to GaryLibrary like so
(following) and I have created a class called ArrayLists: -

using System;
using System.Collecti ons.Generic;
using System.Text;

namespace GaryLibrary
{
public class ArrayLists
{

}
}
So I guess now I will just write my array list examples in this class.
One thing I have learnt recently is how to copy the contents of an
arraylist to a listview, so I will code a method called ' .tolistview '

Question: Mark said I should break up different namespaces with
corresponding folders, I don't understand this? How do i do this and
what does it mean?

Question2: Should I code all my examples in this one file just creating
a different class for each topic? for instance I have a class
ArrayLists at the moment. Next I would create a class InternetExplore r
etc... to store examples i've learnt recently of interfacing with
internet explorer.

Question3: Generate documentation automatically using the XML feauture.
Can someone explain what this is and how I do it please.

Many Thanks,

Gary.

Dec 1 '06 #4

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

Similar topics

1
1319
by: Javier Estrada | last post by:
I have a source-code library, that provides header and source files (similar to MFC). What would be a good way to automatically incorporate it into other projects? The way I do it today is by appending it to the list of include directories and adding each source file to the project, but this is time consuming--and error prone.
1
7106
by: Jim | last post by:
Have fully operational software package developed on VB.NET that worked until Jan 1 2003, with early stage deployments on Oct 10, Oct 23, Nov 11, Dec 12 and Dec 30. When attempted final deployment on Jan 2, 2004 got following messages and errors... I reset everything and tried several times agian. Then erased the setup project and tried to rebuild a new one with the same errors. PLease note... ALL this this code ran perfectly five minutes...
7
8234
by: teliot | last post by:
I'm just starting to use VWD Express. Supposedly, if I use a separate file (code behind) for my web forms, it should build them into a DLL into the Bin folder. However, no bin folder was automatically created when I create the project, nor when I build the website. And no DLL was placed anywhere in my website folder. How do I build the code-behind files so they would be in the bin folder???
1
2009
by: tony | last post by:
Hello! I just want to find out how the system find the name to set on a assembly User control dll. I have done this. 1. Create a user control - Here the namespace was set by the system to WindowsControlLibrary2 - The name of the class was also set by the system to UserControl1 - The name of the assembly dll was set by the system to
4
4450
by: yhebib | last post by:
Hello All, I've been browsing and reading all articles I could find on technet ,msdn and other knowledgeable sources to understand the issue I'm dealing with. However, I did not find so far how to fix that. Investigations are still under progress and I hope you'll be able to give hints or feedback that will drive me to the solution. The applications I'm working on until the next release that will soon
2
1395
by: bluesky | last post by:
Hi All, I am new to javascript and intend to build a custom library. After saving independent files which contain separate functions, how does one build the library? Any help is a great help!! Thanks in advance Thanks ananth
1
1210
by: Steve Le Monnier | last post by:
Using C# I've created a code library of useful functions I use regularly in ..NET projects. I know if you want to make a DLL available to COM clients, you have to include an interface and guid ID e.g.
0
1019
by: Exilemedia | last post by:
I'm currently trying to build my own web framework using ASP.NET, .NET 2.0 and C#. It's mostly going to contain commonly used web applications like code for a forum, a web store, blog, etc. I have most of the data and business layers complete. I'm currently building the presentation layer for the admin section to control my framework but I would like to include it into the code library and compile it into a DLL along with all the other...
9
1171
by: Gareth | last post by:
Hi, I have a new VB.NET project and a VB.NET dll. The DLL is compiled directly to the bin\debug folder of the VB.NET project The project reference path for the DLL is to the compiled DLL in the bin\debug folder. (not the bin\debug folder of the DLL code project) BUT, when I get to code referencing the DLL functions in the main VB.NET
0
9643
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
10319
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10087
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9947
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
8971
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
7496
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
6737
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.