Well, I assume you are using VS 2003/2005, but in your project right click on your project and select Add New Item; in the window that pops up select 'Class' as the file you want to add and name it whatever. (Will have a .
vb or .cs extension)
All you have in that file is something like this:
Public Class [Name]
End Class
or
public class [name]
{
}
So from here you create variables, methods, functions etc that will be reused throughout your application.
I do this alot for custom error checking logic and for Database calls; for example all of my projects have a class named DataAccess.cs so what I do in my pages is something like this:
DataAccess da = new DataAccess()
private void someMethod();
{
DataTable dt = new DataTable();
dt = da.getDataTable(sSql);
}
Essentially my DataAccess class redueces my redundancy of creating DataAdapters, SQL Connections, etc this central file handles all of that. (Especially nice when i need to make a change of some sort, its just one change that is then application wide)
In the above example, da.getDataTable is a function that takes a sql statement as an argument and returns a datatable.
If you would like any other insight please let me know.
"The one language all programmers understand is profanity."