C# Help!

A

Adam Knight

Hi all,

I am wanting to convert the following VB statements into their C#
equivalents.
Appreciated any help!!!

'variable declaration
Dim Session As System.Web.SessionState.HttpSessionState

If Not System.Web.HttpContext.Current.Session Is Nothing Then

'retrieve session object from page
Session = System.Web.HttpContext.Current.Session

End If

Cheers,
Adam
 
M

Mike via DotNetMonster.com

System.Web.SessionState.HttpSessionState session;

if(null != System.Web.HttpContext.Current.Session)
{
'retrieve session object from page
session = System.Web.HttpContext.Current.Session;
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top