Microsoft.CSharp Namespace

Namespace: Microsoft.CSharp

The Microsoft.CSharp namespace provides types that support the C# programming language, including the dynamic language runtime (DLR) and expression trees.

Classes

Classes in Microsoft.CSharp

Methods

No top-level methods are directly exposed in this namespace. Methods are typically accessed through the classes within this namespace.

Structs

No top-level structs are directly exposed in this namespace.

Enums

Enums in Microsoft.CSharp

CSharpArgumentInfo Class

Represents information about a dynamic argument passed to a dynamic operation.


public sealed class CSharpArgumentInfo
        

Constructors

Properties

CSharpBinderFlags Enum

Specifies flags for constructing C# binders.


public enum CSharpBinderFlags
        

Members

ExpandoObject Class

Represents an object whose members can be dynamically added and removed at run time.


public sealed class ExpandoObject : IDynamicMetaObjectProvider, ICollection>, IEnumerable>, IEnumerable
        

Example

C# Example


using Microsoft.CSharp;
using System.Dynamic;

dynamic expando = new ExpandoObject();
expando.Name = "Alice";
expando.Age = 30;

Console.WriteLine($"Name: {expando.Name}, Age: {expando.Age}");
            

RuntimeBinderException Class

The exception that is thrown when the common language runtime cannot dynamically bind a member or operation.


public sealed class RuntimeBinderException : Exception
        

Constructors