decimal totalPrice = 99.95M;
bool isUserLoggedIn = true;
int numberOfItems = 10;
double piValue = 3.14159265359;
int? nullableValue = null;
int studentAge = 20; // Variable name follows camelCase convention.
short myShort = 42;
int myInt = 12345;
char myChar = 'A';
float myFloat = 3.14f;
double myDouble = 2.71828;
string myString = "Hello, World!";
class MyClass
{
// Class members and methods go here
}
MyClass myObject = new MyClass();
object myObject = 42;
interface IShape
{
double CalculateArea();
}
unsafe
{
int* ptr;
int num = 42;
ptr = #
Console.WriteLine(*ptr); // Prints the value 42
}