Provides fundamental classes and base types that define primitive data types, event access, exception classes, math functionalities, and more.
Represents text as a sequence of UTF-16 code units. This is a reference type.
Gets the number of characters in the current String object.
Indicates whether the specified string is null or an empty string ("").
Determines whether the specified substring occurs within this string.
Converts this string to uppercase.
string message = "Hello, World!";
Console.WriteLine(message.Length); // Output: 13
Console.WriteLine(string.IsNullOrEmpty("")); // Output: True
Console.WriteLine(message.Contains("World")); // Output: True
Console.WriteLine(message.ToUpper()); // Output: HELLO, WORLD!
Provides standard input, output, and error streams, along with other members that can be used to query information about the current environment or to manage the runtime.
Writes the specified value to the standard output stream.
Reads the next line of characters from the standard input stream and returns as a string.
Console.WriteLine("Enter your name:");
string name = Console.ReadLine();
Console.WriteLine($"Hello, {name}!");