Following is the example of defining a class with static properties and those can be access directly with a type instead of specific object name.
class User
{
public static string name, location;
public static int age;
}
What is static keyword in c#?
class User
{
public static string name, location;
public static int age;
}