473,400 Members | 2,163 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,400 software developers and data experts.

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 1526
ga********@myway.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>FindInFiles 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********@myway.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>FindInFiles 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.Collections.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 InternetExplorer
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
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...
1
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...
7
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...
1
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...
4
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...
2
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!!...
1
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...
0
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...
9
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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,...

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.