I am not sure exactly what you are trying to do but this gives no errors. I repositioned some brace characters, changed DateTime to string in a couple of places to ensure consistency and separated the code that instantiated
clsFootballPage into a separate class. A separate class because I didn't think you wanted to instantiate
clsFootballPage within itself.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
public class clsFootballPage
{
private Int32 footballteamNo;
private string teamName;
private Boolean footballLeague;
private string teamCaptain;
private string teamManager;
private int teamTitles;
private string teamEstablishment;
public int FootballTeamNo
{
get
{
return footballteamNo;
}
set
{
footballteamNo = value;
}
}
public string TeamName
{
get
{
return teamName;
}
set
{
teamName = value;
}
}
public Boolean FootballLeague
{
get
{
return footballLeague;
}
set
{
footballLeague = value;
}
}
public string TeamCaptain
{
get
{
return teamCaptain;
}
set
{
teamCaptain = value;
}
}
public string TeamManager
{
get
{
return teamManager;
}
set
{
teamManager = value;
}
}
public int TeamTitles
{
get
{
return teamTitles;
}
set
{
teamTitles = value;
}
}
public string TeamEstablishment
{
get
{
return teamEstablishment;
}
set
{
teamEstablishment = value;
}
}
}
class SomePartOfTheProgram
{
void SomethingToDo()
{
clsFootballPage AFootballTeam = new clsFootballPage();
AFootballTeam.TeamEstablishment = "Team Establishment";
string TheTeamEstablishment;
TheTeamEstablishment = AFootballTeam.TeamEstablishment;
}
}
}