TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Malcolm Pordes
1.7k
26
1.9k
The name 'InitVariables' does not exist in the current context
Dec 13 2010 11:15 AM
I'm a C# newbie. I'm getting the above error in the section of code below:
namespace SSTW
{
public partial class FormGameType : Form
{
public FormGameType()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
InitVariables.GameType = 1; //Regular game
}
}
}
The other relevant code snippets are:
namespace SSTW
{
class InitVars
{
public int GameType{ get; set; }
}
}
namespace SSTW
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
InitVars InitVariables = new InitVars();
Any help would be appreciated.
Reply
Answers (
1
)
Add all to one message box and not individuals
why wont C#do this simple action?