src/Misc/EFTools/DesignXmlCore/Base/Shell/TreeGridDesignerTreeControl.cs
/// <summary>
///     retrieves the column index given a type.  Assumes there
///     will only be a single instance of each type in the columns array.
///     returns -1 if the column is not found
/// </summary>
retrieves the column index given a type.  Assumes there
will only be a single instance of each type in the columns array.
returns -1 if the column is not found
retrieves the column index given a type . Assumes there will only be a single instance of each type in the columns array . returns - 1 if the column is not found
private int FindCurrentColumnOfType(ProcessKeyResult result)
        {
            var index = -1;
            int i;
            for (i = 0; i < _currentColumns.Length; i++)
            {
                var columnType = _currentColumns[i].GetType();
                if (result.ColumnType == null
                    || columnType == result.ColumnType
                    || columnType.IsSubclassOf(result.ColumnType))
                {
                    index = i;
                    break;
                }
            }
            return index;
        }
private int FindCurrentColumnOfType ( ProcessKeyResult result ) { var index = - 1 ; int i ; for ( i = 0 ; i < _currentColumns . Length ; i ++ ) { var columnType = _currentColumns [ i ] . GetType ( ) ; if ( result . ColumnType == null || columnType == result . ColumnType || columnType . IsSubclassOf ( result . ColumnType ) ) { index = i ; break ; } } return index ; }
retrieves the column index given a type.
retrieves the column index given a type .
result
ProcessKeyResult