Function in js might be a little different from delegate in C#.
I want the original function pointer in C#, not through a delegate.
private void originalFunction(){...}
private void createWindow(Function windowFunc...){...}
here I want 2 call it like this
...createWindow(originalFunction)
not
myDelegateType myDelegate = new myDelegateType(originalFunction);
...createWindow(myDelegate)
....I dont want 2 pass a Delegate in the argument list, it forces me to create a variable
it is redundant....
PS:the language is C#
You can declare a delegate and have a method with the delegate as parameter. Then just pass in a method with same signature, there’s no need to create a redundant variable of the delegate.
you are cool!by the way ,do you know the type of type? I dont wanna pass a parameter as typeof(MyType) ,I want to pass (MyType), I think “typeof” is redundant.