System.TermInfo.ParameterizedStrings.GetDynamicOrStaticVariables C# (CSharp) Method

GetDynamicOrStaticVariables() private static method

Gets the lazily-initialized dynamic or static variables collection, based on the supplied variable name.
private static GetDynamicOrStaticVariables ( char c, FormatParam &dynamicVars, FormatParam &staticVars, int &index ) : FormatParam[]
c char The name of the variable.
dynamicVars FormatParam The lazily-initialized dynamic variables collection.
staticVars FormatParam The lazily-initialized static variables collection.
index int The index to use to index into the variables.
return FormatParam[]
            private static FormatParam[] GetDynamicOrStaticVariables(
                char c, ref FormatParam[] dynamicVars, ref FormatParam[] staticVars, out int index)
            {
                if (c >= 'A' && c <= 'Z')
                {
                    index = c - 'A';
                    return staticVars ?? (staticVars = new FormatParam[26]); // one slot for each letter of alphabet
                }
                else if (c >= 'a' && c <= 'z')
                {
                    index = c - 'a';
                    return dynamicVars ?? (dynamicVars = new FormatParam[26]); // one slot for each letter of alphabet
                }
                else throw new InvalidOperationException(SR.IO_TermInfoInvalid);
            }