+ 3
Static Vs delegates?
i know both r different...But i want to which one i should use? I have a method in another class which is static...i want to should i keep it static Or should i use delegates? which one will take more memory?
2 Answers
0
You shouldn't be concerned about memory for this. (But the delegate will take up a tiny amount more, as it's a pointer to the function that will exist either way.) As for which one you should use, I can't tell you. That's your decision and it depends on what your needs are for the program. Would you be passing the delegates around a lot because the function needs to be visible to many classes? You should probably choose a static function then. Will you need to dynamically change which function is called for any reason? You should probably choose a delegate. Both? You may want to have a static function that calls the delegate in the background.
Good luck
0
great,,thanks