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
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
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)
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
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
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
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]
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