Show / Hide Table of Contents

    IMetaList<TDwo>.This[int index] Property

    .NET Standard 2.x

    Gets or sets an element by index.

    Namespace: DWNet.Data

    Assembly: DWNet.Data.dll

    Syntax

     TDwo this[int index] { get; set; }
    

    Return

    TDwo

    The element at the specified index.

    Examples

    The following code example demonstrates how to use the Index property.

    using DWNet.Data;
    using System;
    
    namespace Appeon.ApiDoc.IMetaListExamples
    {
        public class Index1Example
        {
            private readonly SchoolContext _context;
    
            public Index1Example(SchoolContext dataContext)
            {
                // Sets the data context
                _context = dataContext;
            }
    
            public void Example()
            {
                // Instantiates datastore with datawindow: d_department
                var datastore = new DataStore("d_department", _context);
    
                datastore.Retrieve();
    
                var columnMetas = datastore.DwMeta.Columns;
                Console.WriteLine("Columns Count: {0}", columnMetas.Count);
    
                // Gets the ID and name of the first column.
                Console.WriteLine("Column Name: {0}; ID: {1}",
                    columnMetas[0].Name, columnMetas[0].ID);
    
                /*This code produces the following output:
                
                Columns Count: 5
                Column Name: Departmentid;  ID: 0
                */
            }
        }
    }
    

    Example Refer To

    Model Class: D_Department
    DataWindow File: d_department

    Applies to

    .NET Standard

    2.x

    Back to top Generated by Appeon