[Mono-dev] RootContext.cs

Mudit Vaidya muditvaidya at gmail.com
Thu Feb 12 10:02:31 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.

ArrayList ad = new ArrayList();
               
ad.Add(tc.Fields);
String[] ia = (String[])ad.ToArray(typeof(String));
Console.WriteLine(ia[0]);
            for (int k = 0; k < ia.Length; k++)
               Console.WriteLine("ia.count"+ia.Length+ia.GetValue(k));

what is the reason for tc.Fields not having any values ? 


Marek Safar wrote:
> Hi,
>> 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 
>> class.
>> Any help appreciated.
>>
>>   
> I don't know what information you need but type fields are stored in 
> TypeContainer::Fields
>
> Marek
>


More information about the Mono-devel-list mailing list