0

Hello guys I'm new to C# programming. I'd like to know what's the equivalent of this Java static to C#?

class NMM 
{
public static void main(String []args)
{
System.out.println("java");
}


static 
{
System.out.println("great");
NMM.main(null);
System.out.println("programmer");
System.exit(0);

}

}

Any help would be appreciated.

2
Contributors
4
Replies
5
Views
4 Years
Discussion Span
Last Post by bettybarnes
0

I changed to

static NMN(){ 
Console.Write("great"); 
NMN.Main(null);
Console.Write("programmer");

}

but it didn't display the programmer text.

0

this one:

class Program
    {
        static void Main(string[] args)
        {
            Console.Write("java");
        }

        static Program() 
        {
            Console.Write("great ");
            Program.Main(null);
            Console.Write(" programmer");
        }
    }

Edited by bettybarnes

0

hey friend I got it already I put the ReadLine() after Console.Write(" programmer");

Edited by bettybarnes

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.