473,396 Members | 1,927 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,396 software developers and data experts.

Where To Store Common Code

In VB6 I used to put Public variables, functions and Subs in a BAS Module.
What is the best way to handle this in .NET? From what I see in some books
it looks like I should use a Class Library but two books referred to a
"Module" - I have no idea where that option is?

--
------------------------------------
Wayne Wengert
wa***@wengert.org
Jul 19 '05 #1
2 1570

"Wayne Wengert" <wa***@wengert.org> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
In VB6 I used to put Public variables, functions and Subs in a BAS Module.
What is the best way to handle this in .NET? From what I see in some books
it looks like I should use a Class Library but two books referred to a
"Module" - I have no idea where that option is?


A module can store any kind of code. I create a module called "defines"
saved in "defines.vb" to store my global variables. etc., for a project.

Module Defines

...........variable declarations etc......

End Module
Jul 19 '05 #2
If u're coding using C# .. then u cannot add the Module file directly
using visual studio 2002. I'm not too sure about 2003. But if u're
coding in VB.NET then u can add a module file under add items ... So
if its C# create a .cs file.. define it like told by Wayne .. and then
add it from "add exisitng items"
That is also good ..
But pls correct me if i'm wrong ..
if u're using C#.. u could store static variables in a class right ..?
I'm not sure if both works out to be the same ..... anyone with more
inputs on that ..?
Jul 19 '05 #3

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

Similar topics

4
by: Russell E. Owen | last post by:
I'm writing a cross-platform app. Presently it runs on unix and MacOS X, but eventually I'd like to get it working on Windows (nothing older than 2000). For unix and MacOS X I store settings in...
6
by: Marco Aschwanden | last post by:
I want to store a file in the application directory. What is the easiest way to figure out, where my application is situated? sys.argv does not work for my purposes... do you have any other...
7
by: Jenny | last post by:
Hi, I have a class foo which will construct some objects in my code. some of the objects store int values into the data deque, while others store float values to the deque. template <class...
2
by: Wayne Wengert | last post by:
In VB6 I used to put Public variables, functions and Subs in a BAS Module. What is the best way to handle this in .NET? From what I see in some books it looks like I should use a Class Library but...
5
by: wrecker | last post by:
Hi all, I have a few common methods that I need to use at different points in my web application. I'm wondering where the best place would be to put these? I think that I have three options. ...
4
by: Ranginald | last post by:
Hi, I am generally new to OOP and in learning and writing code I have developed many of my own reusable methods. A. What is the best way to store these methods for easy reuse later? I was...
10
by: Paul Cheetham | last post by:
Hi, I am developing an application that needs to store some machine-specific settings. The application is going to be published on the network in order to keep the clients on the latest version....
0
by: rxding | last post by:
Can Java Store Procedure increase performance Hello, Performance reason we need to move some of our code into database. Java Store Procedure is given the first choice. However, while...
8
by: =?Utf-8?B?Y2FsZGVyYXJh?= | last post by:
Dear all, I am building a set of libraries working in a n tiers architecture Some of those libraries use common configuration settings like the database connection string and some others. I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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?
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...

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.