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

Scope of a Module

Hello,

° If you declare a Module (Shared Class) like:

Namespace Global.Structs
Module Credentials
Private _UserFullName As String
Public ReadOnly Property UserFullName() As String
Get
Return _UserFullName
End Get
Set(ByVal Value As Boolean)
_UserFullName = Value
End Set
End Property

.......... more stuff ...........

End Module
End Namespace

° Reference it in another project (TestApp)

Will it be the same instance if run TestApp twice on the same Computer?

eg: You set the value Global.Structs.Credentials.UserFullName when the user closes the LoginDialogBox:
The first instance of the Application he logs in as "John"
The second instance of the Application he logs in as "Doe"

Will the UserFullName be "John" and "Doe" in the according Aplpications, or will it become "Doe" in both applications?

Thanks,

Michael
Nov 20 '05 #1
4 1276
"Michael Maes" <mi*****@merlot.com> schrieb

° If you declare a Module (Shared Class) like:

Namespace Global.Structs
Module Credentials
° Reference it in another project (TestApp)

Will it be the same instance if run TestApp twice on the same
Computer?


No, it's a different instance.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
"Michael Maes" <mi*****@merlot.com> schrieb

° If you declare a Module (Shared Class) like:

Namespace Global.Structs
Module Credentials
° Reference it in another project (TestApp)

Will it be the same instance if run TestApp twice on the same
Computer?


No, it's a different instance.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
Thanks Armin.
Just wanted to be shure.

Michael
"Armin Zingler" <az*******@freenet.de> wrote in message
news:40***********************@news.freenet.de...
"Michael Maes" <mi*****@merlot.com> schrieb

° If you declare a Module (Shared Class) like:

Namespace Global.Structs
Module Credentials


° Reference it in another project (TestApp)

Will it be the same instance if run TestApp twice on the same
Computer?


No, it's a different instance.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #4
Thanks Armin.
Just wanted to be shure.

Michael
"Armin Zingler" <az*******@freenet.de> wrote in message
news:40***********************@news.freenet.de...
"Michael Maes" <mi*****@merlot.com> schrieb

° If you declare a Module (Shared Class) like:

Namespace Global.Structs
Module Credentials


° Reference it in another project (TestApp)

Will it be the same instance if run TestApp twice on the same
Computer?


No, it's a different instance.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #5

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

Similar topics

1
by: Inyeol Lee | last post by:
I'm an OOP newbie, and needs help on subclassing from different module. I made a base module a.py which contains two classes C1 and C2; ## start of a.py class C1(object): def m(self):...
4
by: Gabriel Zachmann | last post by:
I am relatively new to python, but i know some other languages, such as C++, fairly well. After reading up a little bit in the reference manual, section 4.1, and searching this NG, i still have 2...
4
by: Hugh Macdonald | last post by:
We're starting to version a number of our python modules here, and I've written a small function that assists with loading the versioned modules... A module would be called something like:...
9
by: Steven T. Hatton | last post by:
It was once suggested to me that I could accomplish much the same thing that modules would accomplish (if C++ had modules) by writing my entire program - except for main() - inside of a class. ...
2
by: Ashish Shridharan | last post by:
Hi All I have been tryign to figure out the scope of a module as shown declared below in a web environment. My Questions are Is this module shared across multiple instances of the...
10
by: Brian | last post by:
If i declare a module level oledbconnection with each request for the page, the variable remains in scope? I get open.executing error message on subsequent calls for the page. I assumed ASP.Net...
2
by: Anand Sagar | last post by:
If I declare a variable in a .vb module file , like Public Module modMain Public temp As String End Module I am able to access the variable temp in all the pages of my site. However, I want...
0
MMcCarthy
by: MMcCarthy | last post by:
We often get questions on this site that refer to the scope of variables and where and how they are declared. This tutorial is intended to cover the basics of variable scope in VBA for MS Access. For...
3
by: John Dann | last post by:
Trying to learn Python here, but getting tangled up with variable scope across functions, modules etc and associated problems. Can anyone advise please? Learning project is a GUI-based...
9
by: mrstevegross | last post by:
I ran into a weird behavior with lexical scope in Python. I'm hoping someone on this forum can explain it to me. Here's the situation: I have an Outer class. In the Outer class, I define a...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.