if (input_int > 0) throw new ArgumentException("some msg");
with
Contracts.Requires<argumentexception>(input_int > 0);
But I was wrong!
I had some free time today and I opened a long bookmarked url and took a look at it. After reading through the first section, I knew I was wrong. There was post compile code weaving and checking. Without it, there is not much virtual inside, but with the post process, everything can happen. And it turns out to be a very much valuable technology than I thought. Kudos!
Some simple googling led me to this blog that provides some analysis I would also do, using Reflector on the generated code, to see the magic there. Also in their home page, there is a video at the bottom(?!) of the page, after some random comments!
No comments:
Post a Comment