Microsoft Namespace

This section details the classes, interfaces, and enumerations within the Microsoft namespace that are part of the .NET Core API.

Sub-Namespaces

Key Classes and Interfaces

IAsyncDisposable

Represents an object that asynchronously disposes its resources.
public interface IAsyncDisposable

Methods

  • ValueTask DisposeAsync():
    Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

EventHandler

Represents a method that handles an event.
public delegate void EventHandler<TEventArgs>(object sender, TEventArgs e) where TEventArgs : EventArgs;
Parameters:
  • object sender: The source of the event.
  • TEventArgs e: An object that contains the event data.
Return Value: void

Lazy

Represents a mechanism for lazy initialization.
public class Lazy<T> : ILazy<T>

Properties

  • T Value { get; }:
    Gets the lazily initialized value of the current Lazy<T> instance.
  • bool IsValueCreated { get; }:
    Gets a value that indicates whether the value of the current Lazy<T> instance has been created.

Methods

  • ToString():
    Returns the fully qualified type name of the current instance.

Action

Represents an operation that accepts four input parameters and returns no output.
public delegate void Action<T1, T2, T3, T4>(T1 arg1, T2 arg2, T3 arg3, T4 arg4);
Parameters:
  • T1 arg1
  • T2 arg2
  • T3 arg3
  • T4 arg4
Return Value: void

Commonly Used Types

While the Microsoft namespace itself contains core foundational types, many of the most frequently used APIs reside within its sub-namespaces like Microsoft.Extensions for dependency injection, configuration, and logging.

Explore the sub-namespaces listed in the sidebar for more detailed API information.