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;
namespace myproject
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
myclass m;
m = new myclass();
textBox1.Text = m.mymethod().ToString();
}
}
public class myclass
{
int x=1;
int y=1;
int mymethod(){ return 1;}
}
}
エラー内容は
エラー 1 'myproject.myclass.mymethod() はアクセスできない保護レベルになっています。
です。どういうことでしょうか?