Skip to content
Snippets Groups Projects
Index.cs 1.04 KiB
Newer Older
  • Learn to ignore specific revisions
  • using System;
    using System.Collections.Generic;
    
    namespace WindStressPRM
    {
        /// <summary>
        /// Index class for raster lists in list
        /// Индекс-класс для растровых массивов
        /// </summary>
        public class Index
        {
            /// <summary>
            /// Outer index
            /// Внешний индекс
            /// </summary>
    
            public int Row { get; private set; }
    
            /// <summary>
            /// Inner index
            /// Внутренний индекс
            /// </summary>
    
            public int Col { get; private set; }
    
            /// <summary>
            /// designated constructor
            /// </summary>
            /// <param name="Row">row index</param>
            /// <param name="Col">column index</param>
            public Index(int Row, int Col)
            {
                if (Row <= -1 || Col <= -1)
                {
                    throw new System.ArgumentOutOfRangeException("Index must be initialized with nonegative integer value");
                }
                this.Row = Row;
                this.Col = Col;
            }
        }
    }