Does System.Activator.CreateInstance(T) have performance issues big enough to discourage us from using it casually?
问题 Does System.Activator.CreateInstance(T) method have performance issues (since I'm suspecting it uses reflection) big enough to discourage us from using it casually? 回答1: As always, the only correct way to answer a question about performance is to actually measure the code. Here's a sample LINQPad program that tests: Activator.CreateInstance new T() calling a delegate that calls new T() As always, take the performance program with a grain of salt, there might be bugs here that skews the