EvaluateInstanceVariableInitializers() private method

private EvaluateInstanceVariableInitializers ( ) : void
return void
コード例 #1
0
ファイル: block.cs プロジェクト: blancosj/dodonet-framework
 internal void EvaluateInstanceVariableInitializers()
 {
     for (int i = 0, n = this.list.Count; i < n; i++)
     {
         Object elem = this.list[i];
         VariableDeclaration vard = elem as VariableDeclaration;
         if (vard != null && !vard.field.IsStatic && !vard.field.IsLiteral)
         {
             vard.Evaluate();
             continue;
         }
         Block block = elem as Block;
         if (block != null)
         {
             block.EvaluateInstanceVariableInitializers();
         }
     }
 }
コード例 #2
0
        internal void EvaluateInstanceVariableInitializers()
        {
            int num   = 0;
            int count = this.list.Count;

            while (num < count)
            {
                object obj2 = this.list[num];
                VariableDeclaration declaration = obj2 as VariableDeclaration;
                if (((declaration != null) && !declaration.field.IsStatic) && !declaration.field.IsLiteral)
                {
                    declaration.Evaluate();
                }
                else
                {
                    Block block = obj2 as Block;
                    if (block != null)
                    {
                        block.EvaluateInstanceVariableInitializers();
                    }
                }
                num++;
            }
        }