marek.safar at seznam.cz
Thu Feb 12 10:19:47 EST 2009
> I am using the following code to access the variables of class compiled
> by mcs but I get no output on the console.
It depends when you are accessing those fields, but they should be
available for most of compilation time.
Look how it works in TypeContainer::AddField (FieldBase field)
> ArrayList ad = new ArrayList();
> String ia = (String)ad.ToArray(typeof(String));
> for (int k = 0; k < ia.Length; k++)
> what is the reason for tc.Fields not having any values ?
This code does not make a sense. TypeContainer::Fields returns a
collection and you are adding this collection into another collection
and then expecting to get string values, isn't that strange?
> Marek Safar wrote:
>>> I am trying to find out what variables were contained in the c# file
>>> parsed by mcs. I am looking in RootContext.cs where the whole
>>> structure is created but I am unable to access the variables of the
>>> Any help appreciated.
>> I don't know what information you need but type fields are stored in
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
More information about the Mono-devel-list