.NET Assemblies - Methods

This section provides detailed information about the methods available within various .NET assemblies. Understanding these methods is crucial for effective development and leveraging the full power of the .NET Framework.

String.IsNullOrEmpty
static bool IsNullOrEmpty(string value)

Indicates whether the specified string is null or an empty string ("").

Parameters

  • value: string
    The string to test.

Returns

A bool value that is true if the string is null or empty; otherwise, false.

Syntax

public static bool IsNullOrEmpty(string value);
List<T>.Add
void Add(T item)

Adds an object to the end of the List<T>.

Parameters

  • item: T
    The object to be added to the end of the List<T>. The value can be null for reference types.

Returns

This method does not return a value.

Syntax

public void Add(T item);
Console.WriteLine
static void WriteLine(string value)

Writes the specified string value to the standard output stream.

Parameters

  • value: string
    The string to write. If value is null, only the line terminator is written.

Returns

This method does not return a value.

Syntax

public static void WriteLine(string value);
Dictionary<TKey, TValue>.ContainsKey
bool ContainsKey(TKey key)

Determines whether the Dictionary<TKey, TValue> contains the specified key.

Parameters

  • key: TKey
    The key to locate in the Dictionary<TKey, TValue>. The value can be null for reference types.

Returns

true if the Dictionary<TKey, TValue> contains an element with the specified key; otherwise, false.

Syntax

public bool ContainsKey(TKey key);
Object.ToString
string ToString()

Returns a string that represents the current object.

Parameters

This method takes no parameters.

Returns

A string that represents the current object.

Syntax

public virtual string ToString();