Part 4 Setting up Variables

Create Globals.cs

Ares uses a number of static variables to hold information about the current user. These are set up in a class called Globals.cs

In the Solution Explorer window right click on ‘Ares’, select ‘Add’ and ‘Class’.

In the ‘Add New Item – Ares’ window that pops up, change the name of the class to ‘Globals.cs’.

Click on ‘Add’.

Change the code inside Globals.cs to the following:

using System;

namespace Ares
{
public static class Globals
{
public static string siteVar = “”;
public static string accountname = “”;
public static string adGroup = “”;
public static string foreName = “”;
public static string surName = “”;
public static string staStuVol = “”;
public static string homeDir = “”;
public static string profileDir = “”;
public static string exchangeDB = “”;
public static string ExchPolicy = “”;
public static string collegeLogin = “”;
public static string cnValue = “”;
public static string cnSite = “”;
public static string miFare = “”;
public static DateTime dateOfBirth = DateTime.Today;
public static string errorCode = “”;
public static string finalTesting = “”;
}
}

About the author: Author

Leave a Reply