C# out parameter performance
问题 Do out parameters in C# have any performance implications I should know about? (Like exceptions) I mean, is it a good idea to have a method with an out parameter in a loop that will run a couple of million times a second? I know it's ugly but I am using it the same way as Int32.TryParse is using them - returning a bool to tell if some validation was successful and having an out parameter containing some additional data if it was successful. 回答1: I doubt that you'll find any significant