Re: [Mono-dev] RootContext.cs

2009-02-13 Thread Marek Safar
Hi, The AddField method is called from cs-parser.cs class twice. But for some reason, nothing gets printed on the console when I use Console.WriteLine() in AddField. Also, I am using VS 2008. How can I debug the code because when I try to use the debug feature, I get the following on

Re: [Mono-dev] RootContext.cs

2009-02-12 Thread Mudit Vaidya
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

Re: [Mono-dev] RootContext.cs

2009-02-12 Thread Marek Safar
Hi, 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)

Re: [Mono-dev] RootContext.cs

2009-02-12 Thread Mudit Vaidya
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: Hi, I am using the following code to access the variables of class compiled by mcs

Re: [Mono-dev] RootContext.cs

2009-02-12 Thread Mudit Vaidya
The AddField method is called from cs-parser.cs class twice. But for some reason, nothing gets printed on the console when I use Console.WriteLine() in AddField. Also, I am using VS 2008. How can I debug the code because when I try to use the debug feature, I get the following on output

Re: [Mono-dev] RootContext.cs

2009-02-08 Thread Marek Safar
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

Re: [Mono-dev] RootContext.cs

2009-02-08 Thread Mudit Vaidya
I am trying tc.Fields but I don't get any option to display the names of fields or their values. Also, I get the following exception Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object at Mono.CSharp.RootContext.PopulateTypes () [0x0]

Re: [Mono-dev] RootContext.cs

2009-02-08 Thread Mudit Vaidya
The information that I need from the parser is name of all the variables that were present in the file which was parsed. 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