I am trying to figure out how to translate the following CIL call into
an Emit statement.
In CIL it is:
IL_004c: callvirt instance class [System.Data]System.Data.DataRow
[System.Data]System.Data.DataRowCollection::get_Item(int32)
The C# equivilant is as follows:
MyDataRowCollection[0];
I thought it would be something like:
ilGenerator.Emit(OpCodes.Callvirt,
typeof(DataRowCollection).GetProperty("Item").GetG etMethod());
However, I can't figure out how to pass in the [Int32] value into the
Emit call to make it like the CIL. Can anyone assist? What is the
proper Emit call in this scenerio? I am a little stumped, obviously I
am doing something wrong, but not sure what it is, exactly.
I would appreciate any assistance.
TIA