Archive

Posts Tagged ‘C#’

Global Variable

Wednesday, 23 April, 2008 Leave a comment

declare:
public class UserInfo
{
private static string pin;
public static string Pin
{
get { return pin; }
set { pin = value; }
}
}

using:
UserInfo.Pin = userdata["pin"].ToString();
string pin = UserInfo.Pin;

Advertisements
Categories: ASP.NET 2.0, C# Tags: ,