tags:

views:

98

answers:

3

Hi all,

Dot net allow you to develop an application in multiple languages i.e c# vb.net,j# etc. Suppose I develop an application in two languages vb.net and c#. If I declare one session variable in vb.net code and i want to access the same session variable in c# code. Is it possible?

A: 

Yes this is possible assuming your are talking about web applications, and they are within the same site / process

JoshBerke
A: 

Your technology is unclear, if you mean Session in the sense of an ASP.NET session then the session is only available to code running in the same application, however the same application can use dlls written in various languages.

If you are refering to global values held in an executable application then again multiple dlls can be included in the application built using different languages. Accessibilty of global values is controlled by, well, their accessibilty modifiers.

AnthonyWJones
A: 

Yes this is completely possible. As long as the DLL's from both languages are using the same instance of Session state then variables from language can be accessed from the other.

JaredPar