DynamicJsonArray Class

Represents a series of values as a JavaScript-like array by using the dynamic capabilities of the Dynamic Language Runtime (DLR).

Inheritance Hierarchy

System.Object
  System.Dynamic.DynamicObject
    System.Web.Helpers.DynamicJsonArray

Namespace:  System.Web.Helpers
Assembly:  System.Web.Helpers (in System.Web.Helpers.dll)

Syntax

'Declaration
Public Class DynamicJsonArray _
    Inherits DynamicObject _
    Implements IEnumerable(Of Object), IEnumerable
'Usage
Dim instance As DynamicJsonArray
public class DynamicJsonArray : DynamicObject, 
    IEnumerable<Object>, IEnumerable
public ref class DynamicJsonArray : public DynamicObject, 
    IEnumerable<Object^>, IEnumerable
type DynamicJsonArray =  
    class 
        inherit DynamicObject 
        interface IEnumerable<Object>
        interface IEnumerable 
    end
public class DynamicJsonArray extends DynamicObject implements IEnumerable<Object>, IEnumerable

The DynamicJsonArray type exposes the following members.

Constructors

  Name Description
Public method DynamicJsonArray Initializes a new instance of the DynamicJsonArray class using the specified array element values.

Top

Properties

  Name Description
Public property Item Returns the value at the specified index in the DynamicJsonArray instance.
Public property Length Returns the number of elements in the DynamicJsonArray instance.

Top

Methods

  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetDynamicMemberNames (Inherited from DynamicObject.)
Public method GetEnumerator Returns an enumerator that can be used to iterate through the elements of the DynamicJsonArray instance.
Public method GetHashCode (Inherited from Object.)
Public method GetMetaObject (Inherited from DynamicObject.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ToString (Inherited from Object.)
Public method TryBinaryOperation (Inherited from DynamicObject.)
Public method TryConvert Converts the DynamicJsonArray instance to a compatible type. (Overrides DynamicObject.TryConvert(ConvertBinder, Object%).)
Public method TryCreateInstance (Inherited from DynamicObject.)
Public method TryDeleteIndex (Inherited from DynamicObject.)
Public method TryDeleteMember (Inherited from DynamicObject.)
Public method TryGetIndex (Inherited from DynamicObject.)
Public method TryGetMember Tests the DynamicJsonArray instance for dynamic members (which are not supported) in a way that does not cause an exception to be thrown. (Overrides DynamicObject.TryGetMember(GetMemberBinder, Object%).)
Public method TryInvoke (Inherited from DynamicObject.)
Public method TryInvokeMember (Inherited from DynamicObject.)
Public method TrySetIndex (Inherited from DynamicObject.)
Public method TrySetMember (Inherited from DynamicObject.)
Public method TryUnaryOperation (Inherited from DynamicObject.)

Top

Operators

  Name Description
Public operatorStatic member Implicit(DynamicJsonArray to Object[]) Converts a DynamicJsonArray instance to an array of objects.
Public operatorStatic member Implicit(DynamicJsonArray to Array) Converts a DynamicJsonArray instance to an array of objects.

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IEnumerable<Object>.GetEnumerator Returns an enumerator that can be used to iterate through a collection.

Top

Remarks

This class represents a helper, which is a component that simplifies web programming in ASP.NET Web Pages. You can use the DynamicJsonArray class to interact with arrays that represent JSON data as if it were native to the host language.

The DynamicJsonArray class lets you get and set element values on a JavaScript-like array and to add new elements to the array, while using the familiar indexing and member-access syntax of the host language.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

System.Web.Helpers Namespace