static_field.htm
In this example we are dealing with static field and several others like static method, try and catch. Very often if block can be set to avoid generating error due to wrong data entry. In the example below, the compiler will not read the code if values are empty ( you can set later with "isnumeric" to

using System;
//static field, static method, goto statment , try catch
//csc static_field.cs
namespace ex_static_field {
public class Player
{
public string id;
public string name;
public static int p_id;
public Player()
{
Console.WriteLine("Blank Constructor evoked");
}
public Player(string name, string id)
{
this.name = name;
this.id = id;
Console.WriteLine("Overloaded Constructor evoked");
}
public static int AddPlayer()
{
return ++p_id;
}
}
class MainClass : Player
{
static void Main()
{
start:
Console.WriteLine("New Number of Players: {0}",Player.p_id);
Console.Write("Enter the player's name: ");
string name = Console.ReadLine();
Console.Write("Enter the player's ID: ");
string id = Console.ReadLine();
if ((id != "" )&(name !=""))
{
try
{
// Create and configure the employee object:
Player e = new Player(name, id);
Console.Write("Enter the current number of employees: ");
string n = Console.ReadLine();
Player.p_id = Int32.Parse(n);
Player.AddPlayer();

// Display the new information:
Console.WriteLine("Name: {0}", e.name);
Console.WriteLine("ID: {0}", e.id);
Console.WriteLine("New Number of Players: {0}",Player.p_id);
}
catch(Exception e){
Console.WriteLine("Wrong Data and " + e);

goto start;
}
}
Console.ReadLine();
}
}
}//end of namenapace

If you decide not to enter any data, it will simply go to the end of the code here it is "Console.ReadLine"