Static in C#

Static in c#
===
class zzz
{
static void Main()
{
yyy a=new yyy();
a.abc();
yyy.pqr();
}
}
class yyy
{
public void abc()
{
System.Console.WriteLine(“C# at abc”);
}
public static void pqr()
{
System.Console.WriteLine(“C# at pqr”);
}
}

PS : VB Developers have the biggest problem understanding static when migrating from programming language Visual basic to a C#.

Related posts :

  • Calling function in C#
  • 2classes.cs and A.cs
  • Namespace in C#
  • Calling dll and Calling int C# code
  • While and Writeline in c sharp
  • Basics of C#
  • Read a file in C#
  • Leave a Comment