Using strongly type names allows for refactor friendly code. Referencing names of properties, types, etc... generally involves reflection which adds overhead which in performance critical applications can be a problem.
Given the following code:
Console.WriteLine( "{0} is now running", typeof( Program ).Name );
Console.WriteLine( "{0} is now shutting down", typeof( Program ).Name );
Is there a way you can skip the reflection during execution? Is there a way to actually make the compiled code execute without the reflection calls?
Console.WriteLine( "{0} is now running", "Program" );
Console.WriteLine( "{0} is now shutting down", "Program" );
I've tried to use Reflection.Emit(), but can't quite seem to get what would be needed. Any suggestions or ideas would be great.