Smart    Lucky

Smart Lucky

  • NA
  • 555
  • 639.5k

Problem in Program

Dec 29 2011 11:19 AM

Hi

i have write below program but it is giving me error which i have bold , can any one help me..............?

public class Beginner

{

 private static int x=35;

static void Main(string[] arg)

{


}

class something
{

 Beginner boogie=new Beginner();

int y=boogie.x;  //  A field initilizer cannot reference the non-static field,method, or propery 'nestedClasses.Beginner.something.boogie


}



Answers (1)