I get this error. Error 1 Inconsistent accessibility: field type 'ClassAndObject .Person' is less accessible than field 'WindowsFormsAp plication.Form1 .myPerson'
Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ClassAndObject;
namespace WindowsFormsApplication
{
public partial class Form1 : Form
{
EnterStudentInfoForm thisEnterStudentInfoForm = new EnterStudentInfoForm();
public static Person myPerson = new Person();
public Form1()
{
InitializeComponent();
}
private void StudentAppExitButton_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void EnterStudentInfoButton_Click(object sender, EventArgs e)
{
thisEnterStudentInfoForm.Show();
}
}
}
Comment