예제 #1
0
        private bool TrySizeOf(E expr, out int sizeAsConstant)
        {
            TypeNode type;

            if (VisitorForSizeOf <V, E> .IsSizeOf(expr, out type, this))
            {
                int size = this.MetaDataProvider.TypeSize(type);
                if (size != -1)
                {
                    sizeAsConstant = size;
                    return(true);
                }
            }

            sizeAsConstant = -1;
            return(false);
        }
예제 #2
0
 public bool IsSizeof(E expr, out TypeNode type)
 {
     return(VisitorForSizeOf <V, E> .IsSizeOf(expr, out type, this));
 }