Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
1 vote
1 answer
79 views

I have been working with creating a custom C# DynamicObject class. I have overloaded TryInvokeMember() and have it working except for some methods that use out parameters. I need to be able to get ...
Ken's user avatar
  • 101
0 votes
1 answer
614 views

I have a gradle based project using Kotli DSL. The hierarchy is like the following. root-project --> child-project A function is defined in root project's build.gradle.kts file. fun printHello() { ...
jatinsachdeva.me's user avatar
0 votes
1 answer
272 views

I have a Method that creates a MethodBuilder Method and defines the Behaviour using ILGenerator and Emit + OpCodes. This Method was created with the help of a previous StackOverflow Question I made - ...
NannerBannaner23's user avatar
0 votes
0 answers
38 views

/** * @return string */ public function getCityIdEncryptedAttribute(): string { return encrypt($this->city_id); } I want to generate this method dynamically in the ...
Mohammad Ali's user avatar
1 vote
1 answer
211 views

I try to return vectors' scalar product using expression trees, but I can not loop into arrays, can u help me? The task description and code please see below: public class CodeGeneration { public ...
Anagureli's user avatar
1 vote
0 answers
43 views

I want to create user-defined formula in Excel addin by ExcelDna ,and before I get the api response I don't know the name of the formula.All of the formula is just like that(It's worked good): public ...
BrandonHe's user avatar
0 votes
1 answer
169 views

I'm trying to get the field value by using DynamicMethod instead of Reflection. If I change the field fldTest to static, the code works fine but I need also non-static field. When I run the code as ...
Rod's user avatar
  • 63
0 votes
0 answers
49 views

I want to create some dynamic method whcih has 2 cycles: in first some N values are pushed onto evaluation stack, in second - these N values are popped from stack. But CreateMethod throws ...
Tadeusz's user avatar
  • 7,033
0 votes
1 answer
371 views

I have a function that is building a dynamic method. As part of this dynamic method, it is calling an action known at generation time. As a minimal reproducible example, consider the following C# code:...
Benji Dial's user avatar
2 votes
1 answer
462 views

I am figuring out Reflection.Emit for some internal libraries and got stuck with calling a Func passed in as an argument. My scenario test uses the code transferred to IL with Linqpad in the picture ...
MiddleTommy's user avatar
5 votes
1 answer
633 views

I am having to deal with maintaining a library which allows users to register a generic handler (Action<T>) against it and later on once it receives an event it goes through each of the ...
MaYaN's user avatar
  • 7,036
0 votes
0 answers
593 views

I'm practicing DynamicMethod from this post, and it all worked fine with the following little codes: private delegate long squareDel(int a); squareDel test; private void Form1_Load(object ...
PiggyChu001's user avatar
0 votes
0 answers
67 views

I wonder how i can assign dynamic method (for example ".text" or ".split()") to my variable. some_selector = "div.test" # is it possible to add here a method? For ...
zarize's user avatar
  • 25
0 votes
0 answers
347 views

I want to make a DynamicMethod which in turn behave like the following for example: AnyClass myClass = new AnyClass(); Func<AnyClass> myFunc = () => myClass; I know that when I want to make ...
Dragonblf's user avatar
  • 115
0 votes
0 answers
22 views

A functional example (out of class) for a better explanation about what I'm trying to get. def greet(): print('Hello world') func = 'greet' func() But, if I use same example as a class method, I ...
Carlos Diaz's user avatar

15 30 50 per page
1
2 3 4 5
11