Sharing a variable between 2 assemblies

  • Thread starter Thread starter cxnoel
  • Start date Start date
C

cxnoel

Hi,

I have a form which contains a variable named UserID. Then, from that
form, I create an instance of a class located in a separate DLL.
This DLL class is added to my form project by project reference.
I want this class to access my UserID variable without passing it to
the new function. Is it possible?

Thanks
 
Is your UserID a roll your own type of authenitication?

I have found that the best way to do this is use the IPrinciple/IIdentity
interfaces in my own rolled user configuration.

Then I can access them from ANY assembly without any problems (including
remoting) using System.Threading.Thread.CurrentThread.CurrentPrinciple

HTH,
CJ


cxnoel said:
Hi,

I have a form which contains a variable named UserID. Then, from that
form, I create an instance of a class located in a separate DLL.
This DLL class is added to my form project by project reference.
I want this class to access my UserID variable without passing it to
the new function. Is it possible?

Thanks



----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption
=---
 
Back
Top