Govt. Exams
Entrance Exams
Enum is a value type in C#. String, Interface, and Delegate are reference types.
string s = "Hello";
s = s + " World";
Console.WriteLine(s);
String concatenation using '+' operator joins the two strings. s becomes 'Hello World' after the concatenation.
Variable names in C# can contain letters, digits, and underscores. They cannot contain special characters like '$'. The variable name must start with a letter or underscore.
Console class is part of the System namespace. You need to include 'using System;' at the beginning of your code to use Console.WriteLine().
C# is case-sensitive. The lowercase keyword 'class' is used to define a class. 'Class' and 'CLASS' are not valid keywords.
C# uses the syntax 'type variableName = value;' to declare and initialize variables. The equals sign (=) is the assignment operator.