Essential C# Methods  Suggest an edit

Calling a Method

Calling a static method:

// Single argument
System.Console.WriteLine("Hello World");
// Multiple arguments
string name = "User";
System.Console.WriteLine("Hello, {0}!", name);

Calling a static method and storing its return value:

string input = System.Console.ReadLine();

Calling an instance method:

int x = 42;
// The instance method called here is Int32.ToString()
string xAsString = x.ToString();

Calling a generic method

// Assuming a method 'T[] CreateArray<T>(int size)'
DateTime[] dates = CreateArray<DateTime>(8);

Table Of Contents
22 Enum
25 GUID
47 Methods
107 Stream
108 Timers
  ↑ ↓ to navigate     ↵ to select     Esc to close