using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication8
{
class Program
{
static void Main(string[] args)
{
}
}
class class1
{
public int i;
static int j;
void test()
{
Console.WriteLine(j);
}
static void test2()
{
Console.WriteLine(i);//静态方法不能访问实例字段
}
}
}
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication8
{
class Program
{
static void Main(string[] args)
{
}
}
class class1
{
public int i;
static int j;
void test()
{
Console.WriteLine(j);
}
static void test2()
{
Console.WriteLine(i);//静态方法不能访问实例字段
}
}
}