muditvaidya at gmail.com
Thu Feb 12 12:02:45 EST 2009
I could find the AddField method in class.cs. I just put a simple
"hello" output statement in the AddField method but that was not printed
on the console.
Who calls the AddField method ?
Marek Safar wrote:
>> 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