Unavailable Operators in generated C# Code (methodof, fieldof) #141

Closed
opened 2013-09-26 07:35:16 -05:00 by SurfingNerd · 2 comments
SurfingNerd commented 2013-09-26 07:35:16 -05:00 (Migrated from github.com)

MSIL supports some operations that are not available in the C# Language.
like the methodof() Operator.
AFAIK there should be another way to retrieve the wanted information for every occurence of this problem (methodof(), fieldof(), ...)
like Typeof(Number).GetMethod("myMethod")

Of course, this would lead to another result,
if you decompile an assembly to C#, and then compile it again,
but at leased, you are able to compile the generated code.
Maybe this behaviour should be configurable.

Tell me what you think about this topic,
maybe i can do it myself, and can make a pull request.

thanks for reading :)

MSIL supports some operations that are not available in the C# Language. like the methodof() Operator. AFAIK there should be another way to retrieve the wanted information for every occurence of this problem (methodof(), fieldof(), ...) like Typeof(Number).GetMethod("myMethod") Of course, this would lead to another result, if you decompile an assembly to C#, and then compile it again, but at leased, you are able to compile the generated code. Maybe this behaviour should be configurable. Tell me what you think about this topic, maybe i can do it myself, and can make a pull request. thanks for reading :)
jbevain commented 2013-09-26 07:36:41 -05:00 (Migrated from github.com)

Hey! Sorry but how is this a bug in Cecil :) ?

Hey! Sorry but how is this a bug in Cecil :) ?
leppie commented 2013-09-28 05:28:34 -05:00 (Migrated from github.com)
@SurfingNerd See https://github.com/Fody/InfoOf
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-jbevain/cecil#141
No description provided.