0
Answer

ILGenerator

Ask a question
fawndull2

fawndull2

19y
1.8k
1
Hey Guys, I have a class that can contain a formula. I dont know what this formula is going to be in advance. What I want to do is have a method called calculate in which the code of the method is modified to calculate the inputted formula. Is there anyway to generate IL code and attach it to an instance of a class. Maybe using virtual methods or delegates or something. I dont want to create an extra type because the formula can change a lot in one execution and i dont want to create all those unecessary types.

Next Recommended Forum