Hi,

I would like to change a return parameter of a method from void to
string[].
I tried to get the typereference for the string[] from the
mscorlib.dll but when I look at the saved modified method i see that
the return parameter is -  class [mscorlib]System.'String[].
can anyone tell me what am i doing wrong?

my code:


AssemblyDefinition mscorlib_def = AssemblyFactory.GetAssembly
(Type.GetType("System.Object").Assembly.Location);
TypeReference string_arr_ref_ooo  = new TypeReference("String[]",
"System", mscorlib_def.Name, false);

TypeReference string_arr_ref = assembly.MainModule.Import
(string_arr_ref_ooo);

..
...

rest of the code is replacing the return parameter with
string_arr_ref.

Thanks.
--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to