私のサンプルコード:
public partial class Service1 : ServiceBase
{
object a = new object ();
static void methodA()
{
string[] tests = {"test1","test2","test3"}
foreach(string test in tests)
{
a.SetValue(""); //object a cannot be seen
}
}
}
オブジェクトが見えません。for
ループ内でオブジェクトを使用するにはどうすればよいですか?